Help with a "simple" autofill macro

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
159
Hello everyone. Needed some help with what seems to me would be a simple autofill macro. Below is a report output for one store. As you can see, it has some of the cells merged together, until the next new values occur in column A, C, D. I have several other sheets in the workbook that output for different stores, each store being on its own tab. I would like to:

A- unmerge the columns A,C,D and basically "Repeat item labels" as you would in a pivot table. I.e. copy the values down until the next new value occurs. For example, copy site ID 04100 down to row 10, in category, copy cosmetics down to row 5, copy hair care down to row 7 etc Im sure you know what I mean.

and then

B- move to the next tab in the workbook and do the same until all tabs are gone through, although that tabs range and list of categories etc will be dynamic. All the sheets start like the example below though, with colum headers being in row 3 and then the data following the same layout from there.

Ideally I would just modify the source report to repeat these labels for me but that is proving to be difficult for me to do right now. Any help would be greatly appreciated.

1586263722136.png
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
So I took a pause and I think that power query is the way to go for my end result, so I posted there and would like to shift focus to that method.

 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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