View Full Version : summing range of row


sal21
01-04-2008, 12:17 PM
is possible to add total in column N for each orizzontal range do until last cell in column A is filled?

Example:
summing range B5:M5 put total in cell in column N
summing range B6:M6 put total in cell in column N
...
summing range B69:M69 put total in cell in column N

In this case the column of total is N but the sheet is dinamic...
To intercept the column where the total is stored find "TOT" in line 4

unmarkedhelicopter
01-04-2008, 12:33 PM
=sum(b5:m5)

shades
01-05-2008, 02:57 PM
Howdy, if you want to use VBA code, then try this. It will count the number of rows completed in Column A, and provide Sum in Column N.


Sub Macro1()
Dim LastRow As Long
Dim Cnt As Long
LastRow = Worksheets("STAT_NEW_1").Cells(Rows.Count, 1).End(xlUp).Row
For Cnt = 5 To LastRow
Cells(Cnt, 14).FormulaR1C1 = "=SUM(RC[-12]:RC[-1])"
Next Cnt
End Sub

________
MARIJUANA TEST (http://drugtestingkit.org)