Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
moving the cell selection in VB | Excel Programming | |||
Moving a selection... | Excel Discussion (Misc queries) | |||
Repeating columns except a couple | Excel Programming | |||
Moving a Selection of Data??? | Excel Programming | |||
Moving a Selection of data??? | Excel Worksheet Functions |