Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Last Cell on a Worksheet


I would like to get the last cell used on a worksheet and place it in
variable. I would like for the last cell address to be in the forma
with a letter as column and an integer as row. For example: if the las
row is L257, I would like it to be stored in the variable as L257 rathe
than as an integer. I know how to find the last cell and display it in
message box after finding integer values of the last row and column. Th
following will display the last cell as $L$257:

MsgBox Cells(LastRow, LastColumn).Address

Can I place that value in a cell as L257? Or can someone point me t
some code that will get the last cell in that format?

Thanks. I know this is easy

--
David
-----------------------------------------------------------------------
DavidW's Profile: http://www.excelforum.com/member.php...fo&userid=3263
View this thread: http://www.excelforum.com/showthread.php?threadid=57422

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Last Cell on a Worksheet

MsgBox Cells(LastRow, LastColumn).Address(False,False)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"DavidW" wrote in
message ...

I would like to get the last cell used on a worksheet and place it in a
variable. I would like for the last cell address to be in the format
with a letter as column and an integer as row. For example: if the last
row is L257, I would like it to be stored in the variable as L257 rather
than as an integer. I know how to find the last cell and display it in a
message box after finding integer values of the last row and column. The
following will display the last cell as $L$257:

MsgBox Cells(LastRow, LastColumn).Address

Can I place that value in a cell as L257? Or can someone point me to
some code that will get the last cell in that format?

Thanks. I know this is easy.


--
DavidW
------------------------------------------------------------------------
DavidW's Profile:

http://www.excelforum.com/member.php...o&userid=32630
View this thread: http://www.excelforum.com/showthread...hreadid=574222



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
Linking Tab/worksheet names to a worksheet cell LinLin Excel Discussion (Misc queries) 3 March 9th 09 03:31 PM
populate cell on worksheet 2 if text is red on worksheet 1 SCrowley Excel Worksheet Functions 14 May 15th 07 09:28 PM
link a cell in the 'Master' worksheet list to a 'Detail' worksheet Paul Condron Excel Programming 12 July 16th 06 10:41 PM
How can I link cell colours from worksheet to worksheet/workbook? Evelyn Excel Worksheet Functions 1 July 5th 05 09:16 PM
selecting cell range in other worksheet without switching to worksheet suzetter[_4_] Excel Programming 4 June 22nd 05 08:55 PM


All times are GMT +1. The time now is 04:49 PM.

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

About Us

"It's about Microsoft Excel"