Hello – I am trying to run this loop where I autofill Column M from M5 all the way down to the last row (last row is based on Column E). It performs just fine for the sheet I run it on but then it just stops. No error message or anything but it fails to continue the process throughout the sheets. Would anyone be able to shine any light on this issue based on the following VBA I am using? Any help would be greatly appreciated:
Dim sht As Worksheet
Dim LastR As Long
For Each sht In ThisWorkbook.Worksheets
With ActiveSheet
LastR = Range("E" & Rows.Count).End(xlUp).Row
.Range("M5").AutoFill Destination:=Range("M5:M" & LastR)
End With
Next sht
Dim sht As Worksheet
Dim LastR As Long
For Each sht In ThisWorkbook.Worksheets
With ActiveSheet
LastR = Range("E" & Rows.Count).End(xlUp).Row
.Range("M5").AutoFill Destination:=Range("M5:M" & LastR)
End With
Next sht