Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Moving your selection over a couple of columns

Hi,

I think this is quite a simple one but I'm just not sure.

I have a macro which says:

Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select

so I have the available data in that column highlighted all I want to
do is then highlights the following 5 columns to the right of it. Each
time I do it with the recorder it gives me the actual cell range like
B2:B2489 but this will change each time the Macro is run. I have also
tried offset but each time I keep losing the highlighted column.

Any help would be much appreciated.

Many Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Moving your selection over a couple of columns

Sub test()

Range(Cells(2, 2), _
Cells(Cells(2, 2).End(xlDown).Row, 6)).Select

End Sub

..Row could be left off.

RBS

wrote in message
ps.com...
Hi,

I think this is quite a simple one but I'm just not sure.

I have a macro which says:

Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select

so I have the available data in that column highlighted all I want to
do is then highlights the following 5 columns to the right of it. Each
time I do it with the recorder it gives me the actual cell range like
B2:B2489 but this will change each time the Macro is run. I have also
tried offset but each time I keep losing the highlighted column.

Any help would be much appreciated.

Many Thanks


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
moving the cell selection in VB GSP@DCS Excel Programming 4 July 21st 06 11:25 PM
Moving a selection... [email protected] Excel Discussion (Misc queries) 3 July 20th 06 04:50 PM
Repeating columns except a couple mjones Excel Programming 0 April 4th 06 02:14 AM
Moving a Selection of Data??? Lime Excel Programming 5 December 18th 05 12:59 AM
Moving a Selection of data??? Lime Excel Worksheet Functions 3 December 17th 05 06:55 PM


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