Ok, I now see in the Immediate window that it properly finds H45. Thanks!!
How do I get it from this stage, to where I can select it and do an Offset
so I can then sort the resulting range?
Sorry, I'm a real VBA novice!
Thanks again,
Harold
"Dave Peterson" wrote in message
...
Debug.Print
will display in the immediate window.
Inside the VBE, you can hit ctrl-g to see that.
or use:
msgbox LastCell.Address
to get a message box.
Harold Good wrote:
Thanks Chip, this didn't seem to do anything. I presume I insert this
between a Private Sub and End Sub lines so it looks like this below. As I
stepped thru it, I didn't see anything in the Locals window, Value
column.
Thanks for any other thoughts you may have. Harold Good
Private Sub LastCell()
Dim LastCell As Range
With Range("Amount_Local")
Set LastCell = .Cells(.Cells.Count).End(xlUp)
End With
Debug.Print LastCell.Address
End Sub
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Chip Pearson" wrote in message
...
Try
Dim LastCell As Range
With Range("Amount_Local")
Set LastCell = .Cells(.Cells.Count).End(xlUp)
End With
Debug.Print LastCell.Address
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Wed, 18 Feb 2009 16:01:25 -0600, "Harold Good"
wrote:
Hi, I am looking for a way to find the last used cell in a named range
within a column. The following will work for an entire column:
Range("A65536").End(xlup).Select
but when I change it to this,using a named Range, it will not work.
Range("amount_local").End(xlUp).Select
"Amount_Local" is part of one column.
Can anyone tell me how to do this within a named range?
Thanks,
Harold
--
Dave Peterson