I am using a macro (mentioned below) which totals figures in a sheet according to days. I need a macro or a formula in a specific cell of another sheet which tells the number of rows for which that sum is taken.
Can someone please help...!!!
Thanks in Advance..!!!
Code:
Dim LR As Long
Dim Area As Range
With ActiveSheet
LR = .Range("J" & .Rows.Count).End(xlUp).Row
If LR = 2 Then
.Range("J4").Formula = "=SUM(J2)"
Else
For Each Area In .Range("J2:J" & LR).SpecialCells(xlCellTypeConstants).Areas
With Area.Resize(1).Offset(Area.Rows.Count + 1)
.Formula = "=SUM(" & Area.Address & ")"
Can someone please help...!!!
Thanks in Advance..!!!