I currently have a workbook with multiple worksheets, including a master worksheet. My current VBA provides a sum total for specified columns in the master worksheet and this works perfectly well.
However, I would like to edit the VBA so I can have sum values for columns on different worksheets too. I have attached the code for reference below, if anyone can suggest how I might edit it in order to include more than one worksheet would be greatly appreciated.
`Sub AutoSum()
Sheets("MASTER ACCOUNT REVENUE").Select
Range("D4").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(2, 0).Select
Dim cel1 As String, cel2 As String
cel1 = ActiveCell.Offset(-2, 0).End(xlUp).Address
cel2 = ActiveCell.Offset(-1).Address
ActiveCell.Value = "=sum(" & (cel1) & ":" & (cel2) & ")"
End Sub`