Forum Discussion

JaredMaz's avatar
JaredMaz
Copper Contributor
Dec 05, 2022

Help with copying

Hi I get the below read out everyday. I've recorded a macros to make some changes to the format of the file as I need to import it somewhere else. 

 

The only piece I do manually is drag and copy the restaurant name "Bedford" down how ever many rows are created for that day. 

 

I was just wondering if there isn't a way to run this copy, paste down the relevant rows if the

 

 

 

 

 

1 Reply

  • JaredMaz 

    Sub FillDown()
    
    Dim i As Long
    i = Range("I" & Rows.Count).End(xlUp).Row
    Cells(2, 10).AutoFill Destination:=Range(Cells(2, 10), Cells(i, 10))
    
    End Sub

    You can try this code. The code checks how many rows are filled with data in column I and then the entry from cell J2 is filled down.