montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 985
- Office Version
- 2010
- Platform
- Windows
Hi All.
working on:
simple and short for this post. I want to add across column, using just the for...next loop,
the three lines I have give me the wrong answer.
Is a dynamic line, reason I use End(xlup).
Thanks for reading.
Your input matters, Please.
working on:
VBA Code:
Sub Add_acr_col()
Dim Cl As Long
For Cl = 2 To Cells(Columns.Count, "B").End(xlUp).Columns
Cells(2, "A").Value = Cells(2, "A").Value + Cells(2, Cl).Value
Next Cl
End Sub
simple and short for this post. I want to add across column, using just the for...next loop,
the three lines I have give me the wrong answer.
Is a dynamic line, reason I use End(xlup).
Thanks for reading.
Your input matters, Please.