Copy current cell to empty cells above, open to better suggestions!

NerdNinja

New Member
Joined
Jul 15, 2015
Messages
6
I'm working on cleaning up a report that contains statistics for all counties in the U.S. by state. I'm trying to find a way to filter the data so I can select only the state and counties I need to look up. Currently, the report contains each county on a row, with the only separation between states being a subtotal row containing the text "Total for Alabama/Alaska/etc". This text appears in column B. I've got a formula that can extract the state name and insert into the cell to the left (column A). But that means I have to copy that cell value (for example copy "Alabama" from cell A406) and paste to all empty cells above. Then go to the next subtotal, extract that state name (for example copy "Alaska" from cell A450) and copy to all empty cells above....stopping just short of where Alabama's data is. There has GOT to be an easier way to do this, I just haven't worked it out yet. I'd appreciate any suggestions to make this process a lot faster. Thanks!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
I'm working on cleaning up a report that contains statistics for all counties in the U.S. by state. I'm trying to find a way to filter the data so I can select only the state and counties I need to look up. Currently, the report contains each county on a row, with the only separation between states being a subtotal row containing the text "Total for Alabama/Alaska/etc". This text appears in column B. I've got a formula that can extract the state name and insert into the cell to the left (column A). But that means I have to copy that cell value (for example copy "Alabama" from cell A406) and paste to all empty cells above. Then go to the next subtotal, extract that state name (for example copy "Alaska" from cell A450) and copy to all empty cells above....stopping just short of where Alabama's data is. There has GOT to be an easier way to do this, I just haven't worked it out yet. I'd appreciate any suggestions to make this process a lot faster. Thanks!
Hi NerdNinja,

Can you share a visual example of the data please? That can either be a screenshot or by googling the MrExcel HTML Maker and using that to share data directly from your workbook onto the forum. Once we can confirm exactly what we are supposed to be seeing as the "before" state of the data, we will stand a better chance of helping you find your solution.

Also, out of interest, are you looking for a formula only solution, or are VBA macros an option?
 
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,451
Members
452,514
Latest member
cjkelly15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top