Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default pick last item from a (variable) range

Hi all,

Is there a formula to pick the last item out of a (variable) range

thanks in advance
Gert

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default pick last item from a (variable) range

How do you mean pick

This piece of code will store and display the last cell in a selected
range(x)

Sub LastCell()

For Each cell In Selection
cell.Select: x = ActiveCell.Value
Next cell
MsgBox x

End Sub

http://www.excel-ant.co.uk

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default pick last item from a (variable) range


Gert wrote:
Hi all,

Is there a formula to pick the last item out of a (variable) range

thanks in advance
Gert


How about this:

x(x.Rows.Count, x.Columns.Count).Value

where x is your range?

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 do I select more than one item from a drop down pick list? Greg Excel Discussion (Misc queries) 2 January 16th 08 10:43 PM
How do I select more than one item from a drop down pick list? Greg Excel Worksheet Functions 1 January 16th 08 03:08 PM
Automatically executing a macro when A pick list item is selected Ken K Excel Programming 1 October 30th 06 11:52 PM
loop through cells in a range and pick up corresponding cell values in another range [email protected] Excel Programming 9 October 19th 06 05:11 AM
ListBox (arrow keys pick each item) TK Excel Programming 9 September 12th 04 07:13 PM


All times are GMT +1. The time now is 11:37 AM.

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"