Hi,
I've got a piece of code that autofills the sheet when run macro it works perfectly fine unless the sheet has only got 2 rows of data (header row and a data row).
I feel i'm missing something quite simple if someone could help me so the auto fill will start from row 2 and auto fill either just the 1 row if data is there or do as many rows are in the sheet.
Thanks in advance
I've got a piece of code that autofills the sheet when run macro it works perfectly fine unless the sheet has only got 2 rows of data (header row and a data row).
I feel i'm missing something quite simple if someone could help me so the auto fill will start from row 2 and auto fill either just the 1 row if data is there or do as many rows are in the sheet.
Code:
sh.Range("H2:N2").AutoFill Destination:=sh.Range("H2:N" & sh.Range("A" & Rows.Count).End(xlUp).Row)
Thanks in advance