Hello Everyone! I have data for one year on the municipal division of 25 counties of one state. The example Excel data is in the following format.
I want to change it to the following format.
I want to do the above for each of the 25 counties in the data.
The code replace variable_name= "Allegany County" in 2/30 works. But doing it for all counties and then all years will have human errors.
I want to know how to do this efficiently.
Thanks in advance!
Allegany County | |
Barton | |
Bel Air | |
Bowling Green-Roberts Place | |
Cresaptown | |
Cumberland | |
Total | |
Anne Arundel | |
LaVale | |
Lonaconing | |
Luke | |
McCoole | |
Midland | |
Mt. Savage | |
Potomac Park Addition | |
Total |
Barton | Allegany County |
Bel Air | Allegany County |
Bowling Green-Roberts Place | Allegany County |
Cresaptown | Allegany County |
Cumberland | Allegany County |
Total | Allegany County |
LaVale | Anne Arundel |
Lonaconing | Anne Arundel |
Luke | Anne Arundel |
McCoole | Anne Arundel |
Midland | Anne Arundel |
Mt. Savage | Anne Arundel |
Potomac Park Addition | Anne Arundel |
Total | Anne Arundel |
The code replace variable_name= "Allegany County" in 2/30 works. But doing it for all counties and then all years will have human errors.
I want to know how to do this efficiently.
Thanks in advance!
Comment