Hi Darin
try
Function fzLastValue(RangeId As Variant, Optional byColumn As Boolean =
True)
Dim cLast As Long
Dim dLast As Long
Application.Volatile
If byColumn Then
cLast = Cells(Rows.Count, RangeId.Column).End(xlUp).Row
dLast = Cells(cLast, Columns.Count).End(xlToLeft).Column
Else
cLast = Cells(Rows.Count, RangeId.Column).End(xlUp).Row
dLast = 1
End If
fzLastValue = Cells(cLast, dLast).Value
End Function
Cheers
julieD
"JulieD" wrote in message
...
Hi Darin
i've emailed you a sample workbook (to the hotmail address) with the code
in it - seems to work okay for me ... does it work on your system?
Cheers
JulieD
"Darin Kramer" wrote in message
...
Hi Julie,
If i put it in the former i get a #/Value error
IF I put it in the latter i get a #/Name error,
So whatever I do I seem to be stuck!!! no idea why.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!