I'm having the hardest time trying to figure out how to run the macro on multiple sheets simultaneously. Therefore, the data should update for all 4 sheets, but that doesn't happen. Instead only the first worksheet gets update. I know the issue has to do with the first couple of lines. Here's the code I've been using:
Thank you for the help! GREATLY APPRECIATE IT.
Code:
Sub AutoNumber() Worksheets("Cap. Rec.").Select
Worksheets("Cap. Disb.").Select False
Worksheets("Rev. Rec.").Select False
Worksheets("Rev. Disb.").Select False
Dim bottomrow As Long
bottomrow = Cells(Rows.Count, "B").End(xlUp).row
Range("A5").Formula = "=A4+1"
Range("'Cap. Disb.'!A4").Formula = "=INDEX('Cap. Rec.'!A5:A1048576, COUNTA('Cap. Rec.'!A5:A1048576), 1)"
Range("'Rev. Rec.'!A4").Formula = "=INDEX('Cap. Disb.'!A5:A1048576, COUNTA('Cap. Disb.'!A5:A1048576), 1)"
Range("'Rev. Disb.'!A4").Formula = "=INDEX('Rev. Rec.'!A5:A1048576, COUNTA('Rev. Rec.'!A5:A1048576), 1)"
Application.ScreenUpdating = False
Range("A5").AutoFill Destination:=Range("A5:A" & bottomrow), Type:=xlFillDefault
Application.ScreenUpdating = True
End Sub
Thank you for the help! GREATLY APPRECIATE IT.