Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Selecting an adjacent column

Hi,

I have two columns of data, the first column has data in every cell
where as the second has some blank cells. Under normal circumstances
the commands

Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select

select these two columns quite successfully.
However if the first cell in the second column is blank e.g.
MDE No. Workgroup
705433605
705433682
705433709
705433717
705433719
705433754
705433755
705433757
705433762 10-JIC5D
705433833
705434007 10-JIC5D

then the selection goes all the way to the last column in the sheet.
How can I select just the adjacent column in this case?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Selecting an adjacent column

Range(Selection,Selection.End(xlDown)).Resize(,2). Select
--
Charles Chickering

"A good example is twice the value of good advice."


" wrote:

Hi,

I have two columns of data, the first column has data in every cell
where as the second has some blank cells. Under normal circumstances
the commands

Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select

select these two columns quite successfully.
However if the first cell in the second column is blank e.g.
MDE No. Workgroup
705433605
705433682
705433709
705433717
705433719
705433754
705433755
705433757
705433762 10-JIC5D
705433833
705434007 10-JIC5D

then the selection goes all the way to the last column in the sheet.
How can I select just the adjacent column in this case?


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
Selecting non-adjacent data jdpf Excel Discussion (Misc queries) 2 April 9th 08 08:49 PM
When data match, copy adjacent value to adjacent column slimbim Excel Worksheet Functions 2 November 8th 06 08:41 PM
summing values from adjacent column with refrence from adjacent column Pivotrend Excel Discussion (Misc queries) 6 March 4th 06 11:24 AM
selecting adjacent cells Tom M Excel Programming 3 February 24th 06 02:06 AM
Selecting non-adjacent rows Jon[_11_] Excel Programming 3 September 11th 03 07:53 PM


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