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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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