montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 984
- Office Version
- 2010
- Platform
- Windows
Hello.
I have a dynamic array B2:F8686 I would like to be able to count and display on column G how many cells are used
so the last cell in use at the moment is F8686 so starting there with 1 and end up on G2 with the count 8686
I tried this but do not work
thank for reading this
I have a dynamic array B2:F8686 I would like to be able to count and display on column G how many cells are used
so the last cell in use at the moment is F8686 so starting there with 1 and end up on G2 with the count 8686
VBA Code:
Sub Cn()
Dim x As Integer
lRow = Cells(Rows.Count, 1).End(xlUp).Row
For x = lRow To 2 Step -1
Cells(x, 6) = x
Next x
End Sub
thank for reading this