Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Retrieve Last Used Cell In Column

I'm having trouble figuring out how to do this. Could someone help me
out.


All of the cells before the last used cell may or may not be filled
with something. In the end I'm going to need the row number of this
cell as well.


Any help is greatly appreciated!

Thanks :)



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to Retrieve Last Used Cell In Column

Hi Marshall

Sub LastCellInColumnA()
Range("A" & Rows.Count).End(xlUp).Select
End Sub

this will give you the row
Range("A" & Rows.Count).End(xlUp).row


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Marshall" wrote in message ...
I'm having trouble figuring out how to do this. Could someone help me
out.


All of the cells before the last used cell may or may not be filled
with something. In the end I'm going to need the row number of this
cell as well.


Any help is greatly appreciated!

Thanks :)



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default How to Retrieve Last Used Cell In Column

Marshall,

Dim lrow as Long
lrow = Cells(Rows.COUNT, "A").End(xlUp).Row

This finds the last used cell in column A, regardless of any blank cells.
Change "A" to any column you want.
--
sb
"Marshall" wrote in message
...
I'm having trouble figuring out how to do this. Could someone help me
out.


All of the cells before the last used cell may or may not be filled
with something. In the end I'm going to need the row number of this
cell as well.


Any help is greatly appreciated!

Thanks :)



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find duplicate cells in Column a & retrieve column B ghost Excel Discussion (Misc queries) 2 February 22nd 09 05:39 PM
How To Retrieve Data From Last Cell In Column? Bagheera Excel Discussion (Misc queries) 14 August 8th 08 10:09 PM
retrieve last entry in column Darrell Shuman Excel Worksheet Functions 1 June 6th 06 05:02 PM
retrieve column index... Bob Bedford Excel Discussion (Misc queries) 1 May 1st 06 01:22 AM
retrieve a column I hid for printing Microsoft Excel Excel Worksheet Functions 2 October 6th 05 07:37 AM


All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"