LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Selecting a cell

OP said In my spreadsheet I have a range of cells (in one column)
I guess I should not have assumed that this was the ONLY column
so
Sub ddddd()' this should work
Range([myvars].Range("a65536").End(xlUp).Address).Select
End Sub

"Tom Ogilvy" wrote in message
...
Just for information -
That goes to the last cell in the usedrange of the sheet, not the last

cell
in the range myvars.


Regards,
Tom Ogilvy


"Don Guillett" wrote in message
...
try this

Sub gotolastcell()
x = [myvars].SpecialCells(xlLastCell).Address
Range(x).Select
End Sub

or a one liner
Sub ddd()
Range([myvars].SpecialCells(xlLastCell).Address).Select
End Sub


"Bob" wrote in message
...
Hi,

In my spreadsheet I have a range of cells (in one column)
which I have given a name, MYVARS.

Thus MYVARS is physically the Sheet2!A1:A17 range.

Now, from within a macro, I want to provide this name
(MYVARS) and the macro must find out its real range and go
to the last cell in that range;

Thus, if I provide MYVARS as input to the macro, it should
position my cursor to the cell Sheet2!A17 because that is
the last cell in the range MYVARS.

Can somebody help?









 
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
selecting a cell Pat Excel Discussion (Misc queries) 1 March 27th 10 09:28 PM
Excel 2007 single cell selecting muliple cell Submit2s Excel Worksheet Functions 1 February 12th 09 04:52 PM
Selecting a cell entry based on cell validation selection Brutalius Excel Worksheet Functions 2 December 17th 08 03:44 AM
Transfer cell values to another cell by selecting button. Gryndar Excel Worksheet Functions 2 November 24th 08 02:21 AM
Selecting A cell... LeahT Excel Discussion (Misc queries) 6 April 16th 08 06:48 PM


All times are GMT +1. The time now is 01:24 AM.

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"