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 |
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 |
All times are GMT +1. The time now is 10:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com