by correctly, i meant the sum showed in the cell, not the formulaQuote:
works correctly for me
i just pasted your code into my ide and set a range to suit
Printable View
by correctly, i meant the sum showed in the cell, not the formulaQuote:
works correctly for me
i just pasted your code into my ide and set a range to suit
Hi Seenu,
I got below error:
Run-time error '1004':
Method 'Rows' of object '_Global' failed
Code:Sub calculateSubtotalOfRows(sRange As String, sumRowEnd As Integer)
Dim i As Integer
For i = 1 To sumRowEnd
sumRowEnd = Cells(Rows.count, i).End(xlUp).Row
Cells(sumRowEnd + 1, i) = WorksheetFunction.SUM(range(Cells(1, i), Cells(sumRowEnd, i)))
Next
End Sub
Value of sRange = B11:R11
Value of sumRowEnd = 20
Hi Ria,
which line gives error? can u attach the file u tried?