Running Macro to fill in new cells without affecting cells already filled

Salts

New Member
Joined
Aug 21, 2019
Messages
16
I have a macro that will be run several times throughout a worksheet.
First time I run macro it will fill column AF down to a certain # of rows based information in column A. Lets say in this case row 20.
Then if we need to add more rows below this, I want to re-run the macro so it will autofill down my drop down menu starting at the last filled row and not from the very beginning of the column.

Is there a way to do this? I know my code below works the first time I run the macro, but the second time it overwrites everything I already input



'FILLS DOWN MAILER COMMENTS DROP DOWN MENU
Range("AF2").AutoFill Destination:=Range("AF2:AF" & lastRow)

'FILLS DOWN PRODUCT IMAGE DROP DOWN MENU
Range("AG2").AutoFill Destination:=Range("AG2:AG" & lastRow)
 

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.
What is the value of lastRow?
Is it the actual row number or the number of rows to be filled?
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,612
Members
452,661
Latest member
Nonhle

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