lneilson
08-04-2008, 08:44 AM
hi all
this is my formula adding up each row and displaying the answer in the column with data +1 and works fine it goes 3 rows to far ive tried to manipulate it with no success
if it matters it should stop on row 80
i will attach part of my page so you can see the problem
thanks
lneilson
lngRowLast = 1
For intCounter = 1 To intColLast
lngRowTemp = Columns(intCounter).Cells(lngRowCount, 1).End(xlUp).Row
If lngRowTemp > lngRowLast Then
lngRowLast = lngRowTemp
End If
Next intCounter
For intCounter = 1 To lngRowLast
Columns(intColLast + 1).Cells(intCounter, 1).Formula = _
"=sum(A" & intCounter & ":" & Columns(intColLast).Cells(intCounter, 1).Address & ")"
Next intCounter
this is my formula adding up each row and displaying the answer in the column with data +1 and works fine it goes 3 rows to far ive tried to manipulate it with no success
if it matters it should stop on row 80
i will attach part of my page so you can see the problem
thanks
lneilson
lngRowLast = 1
For intCounter = 1 To intColLast
lngRowTemp = Columns(intCounter).Cells(lngRowCount, 1).End(xlUp).Row
If lngRowTemp > lngRowLast Then
lngRowLast = lngRowTemp
End If
Next intCounter
For intCounter = 1 To lngRowLast
Columns(intColLast + 1).Cells(intCounter, 1).Formula = _
"=sum(A" & intCounter & ":" & Columns(intColLast).Cells(intCounter, 1).Address & ")"
Next intCounter