Forum Discussion
Multiple headers
Thank you for the reply sir. But its not working. And as the header increases , the total becomes double.
I have sent my excel file
You didn't even bother replacing the AddHeaders and FormatData macros with the macros that I posted...
Do that now, and also change the AutoSum macro to
Public Sub AutoSum()
Dim lastRow As Long
lastRow = Range("F" & Rows.Count).End(xlUp).Row
Do While Range("F" & lastRow).Formula Like "=SUM*"
Range("F" & lastRow).Clear
lastRow = lastRow - 1
Loop
With Range("F" & lastRow + 1)
.Formula = "=SUM(F2:F" & lastRow & ")"
.Font.Bold = True
End With
End Sub- ExcelJan 21, 2021Iron Contributor
I wrote this code as you told me. But nothing happened.
Can you fix this file and give it?
Please sir...???
I am attached file
- HansVogelaarJan 22, 2021MVP
Apparently you haven't run the code. If you run the macros AddHeaders, AutoSum and FormatData, the sheet will look the way you want.
For ease of use I added a macro that calls those three:
Sub Run3Macros() AddHeaders AutoSum FormatData End SubIn the attached version, I ran this macro on each of the regional records sheets. The yearly report sheet hasn't been modified.
- ExcelJan 22, 2021Iron Contributor
Thank you so much sir.
You run the code one by one(AddHeader, FormatData and Autosum)?
Because when i run this code, it didnot works.
And Sir how to delete multiple categories in YEARLY REPORT tab?