Selecting columns in excel

Closed
damienjames0 Posts 2 Registration date Thursday March 28, 2013 Status Member Last seen March 28, 2013 - Mar 28, 2013 at 01:43 PM
Zohaib R Posts 2368 Registration date Sunday September 23, 2012 Status Member Last seen December 13, 2018 - Mar 28, 2013 at 02:17 PM
Hello,
I tried to select a range of cells in excel 2010, using Range("A:H").Select
But this selects the whole worksheet. I have tried different worksheets and they work ok.
Does anyonw know what type of setting is screwing up the original 'range.select'
Thanks
Related:

2 responses

damienjames0 Posts 2 Registration date Thursday March 28, 2013 Status Member Last seen March 28, 2013
Mar 28, 2013 at 02:02 PM
The problem appears to be caused by 'merged cells". If I un-merge all the cells then the columns.select (or range.select) seems to work ok. So how can I get it to work on a worksheet with merged cells?
0
Zohaib R Posts 2368 Registration date Sunday September 23, 2012 Status Member Last seen December 13, 2018 69
Mar 28, 2013 at 02:17 PM
Hi damienjames0,

To select the range A:H on the active worksheet, I use one of the following:

ActiveSheet.Range(Cells(1, 1), Cells(1048576, 8)).Select

ActiveSheet.Range("A:H").Select

ActiveSheet.Range("A1", "H1048576").Select

These work with "Merged Cells" as well.

Do reply with results.
0