T
Tempy
Hi,
I no that this is probably very simple, but i need some help with it.
I have a piece of code that finds the last row used and gives the number
of rows in a msg box.
I however want to use this number of rows further on in the code. I
think i have to then store it as a variable. I have tried but to no
avial?! Please help.
I have to put formulas at the bottom of some of these columns and can
use this figure that is found, as the spreadsheet is continually
changing in lenght.
The code from Ron de bruyn is:-
myRows = last
On Error Resume Next
last = ActiveSheet.Cells.Find(What:="", _
After:=[A1], _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
msgBox last
Les Stout
I no that this is probably very simple, but i need some help with it.
I have a piece of code that finds the last row used and gives the number
of rows in a msg box.
I however want to use this number of rows further on in the code. I
think i have to then store it as a variable. I have tried but to no
avial?! Please help.
I have to put formulas at the bottom of some of these columns and can
use this figure that is found, as the spreadsheet is continually
changing in lenght.
The code from Ron de bruyn is:-
myRows = last
On Error Resume Next
last = ActiveSheet.Cells.Find(What:="", _
After:=[A1], _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
msgBox last
Les Stout