Results 1 to 2 of 2

Thread: Running Macro to fill in new cells without affecting cells already filled
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Aug 2019
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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)

  2. #2
    Board Regular
    Join Date
    Sep 2016
    Posts
    2,571
    Post Thanks / Like
    Mentioned
    36 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Running Macro to fill in new cells without affecting cells already filled

    What is the value of lastRow?
    Is it the actual row number or the number of rows to be filled?

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •