Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range(Selection...question


This may not actually be a macro question but the solution will affect
the work I need to do in a marco.

I have a worksheet of addresses where selection keystrokes
(Ctrl+Shift+Right Arrow) as well as macro code such as
"Range(Selection, Selection.End(xlToRight)).Select" work on the header
row but these selection techniques don't work on the actual address
rows.

The way I use either method is I place the cursor on data in the first
row and either use C+S+R or execute a macro using a keyboard shortcut
assigned to that marco. Either way, the only data that gets selected is
the next row to the right, not the entire row of data. Both methods work
fine in the header row only.


--
JimDandy
------------------------------------------------------------------------
JimDandy's Profile: http://www.excelforum.com/member.php...o&userid=16578
View this thread: http://www.excelforum.com/showthread...hreadid=397279

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Range(Selection...question

that action selects to but not including the next empty cell if the first
cell to the right and the active cell are not empty.

range(cells(1,Activecell.Column),cells(1,ActiveCel l.column).End(xltoRight)).
Offset(ActiveCell.row-1,0).Select

might do what you want.
--
Regards,
Tom Ogilvy

"JimDandy" wrote in
message ...

This may not actually be a macro question but the solution will affect
the work I need to do in a marco.

I have a worksheet of addresses where selection keystrokes
(Ctrl+Shift+Right Arrow) as well as macro code such as
"Range(Selection, Selection.End(xlToRight)).Select" work on the header
row but these selection techniques don't work on the actual address
rows.

The way I use either method is I place the cursor on data in the first
row and either use C+S+R or execute a macro using a keyboard shortcut
assigned to that marco. Either way, the only data that gets selected is
the next row to the right, not the entire row of data. Both methods work
fine in the header row only.


--
JimDandy
------------------------------------------------------------------------
JimDandy's Profile:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range(Selection...question


Thanks! That was it, I really appreciate your help.


--
JimDandy
------------------------------------------------------------------------
JimDandy's Profile: http://www.excelforum.com/member.php...o&userid=16578
View this thread: http://www.excelforum.com/showthread...hreadid=397279

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
VBA range selection question Pete[_7_] Excel Worksheet Functions 24 May 10th 11 07:29 PM
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Creating range name for a range selection Mervyn Thomas Excel Programming 1 January 26th 04 05:18 PM


All times are GMT +1. The time now is 12:53 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"