Hi all,
Addition has never been so frustrating.
I have many, many rows of numbers across several columns. The number of columns and rows will both vary. Values will begin in column B in each row. Would like to avoid loops, too many rows.
Dim lcol as Long
Dim fcol as Long
Dim rrow as Long
lcol = cells(1,columns.count).End(xlToLeft).Column
fcol = (lcol + 1)
rrow=Range("A" & Rows.Count).End(xUp).Row
With Range(Cells(2,fcol),Cells(rrow.fcol)) 'this is the range for results, tested and ok.
.formula = "=sum(" & Cells(2,2).Address & ":" & Cells(2,lcol).Address & ") "
.Value = .Value
End With
I get the answer for the first row in all rows in range.
Help Please.
Addition has never been so frustrating.
I have many, many rows of numbers across several columns. The number of columns and rows will both vary. Values will begin in column B in each row. Would like to avoid loops, too many rows.
Dim lcol as Long
Dim fcol as Long
Dim rrow as Long
lcol = cells(1,columns.count).End(xlToLeft).Column
fcol = (lcol + 1)
rrow=Range("A" & Rows.Count).End(xUp).Row
With Range(Cells(2,fcol),Cells(rrow.fcol)) 'this is the range for results, tested and ok.
.formula = "=sum(" & Cells(2,2).Address & ":" & Cells(2,lcol).Address & ") "
.Value = .Value
End With
I get the answer for the first row in all rows in range.
Help Please.