I have a macro below to show text "Total" in Column A and the total value in Column B in row 30
The data is filtered, so a subtotal needs to compute the value of the values displayed
It would be appreciated if someone could amend my code
The data is filtered, so a subtotal needs to compute the value of the values displayed
Code:
Sub Totals_Extract()
Dim Finalrow As Long
With Application
.ScreenUpdating = False
.CutCopyMode = False
.Calculation = xlCalculationManual
End With
With Sheets("Extract")
Finalrow = .Range("A65536").End(xlUp).Row
.Range("A" & Finalrow + 3).Value = "Total"
.Range("B" & Finalrow + 3).FormulaR1C1 = "=SUBTOTAL(9,R[-25]C:R[-1]C)"
End With
With Application
.ScreenUpdating = True
.CutCopyMode = False
.Calculation = xlCalculationAutomatic
End With
End Sub
It would be appreciated if someone could amend my code