Forum Discussion
starr0650
Aug 19, 2021Copper Contributor
Count rows, end up will not work with only one row
I'm using the below code to find the last row, then autofill column A. LR = Cells(Rows.Count, 4).End(xlUp).Row Range("A2").AutoFill Destination:=Range("A2:A" & LR) It works unless there is o...
- Aug 19, 2021
For example:
LR = Cells(Rows.Count, 4).End(xlUp).Row If LR <> 2 Then Range("A2").AutoFill Destination:=Range("A2:A" & LR) End If
HansVogelaar
Aug 19, 2021MVP
For example:
LR = Cells(Rows.Count, 4).End(xlUp).Row
If LR <> 2 Then
Range("A2").AutoFill Destination:=Range("A2:A" & LR)
End If
- starr0650Aug 20, 2021Copper ContributorThanks Hand! This worked perfectly.