Selecting columns in excel

[Closed]
Report
Posts
2
Registration date
Thursday March 28, 2013
Status
Member
Last seen
March 28, 2013
-
Posts
2368
Registration date
Sunday September 23, 2012
Status
Member
Last seen
December 13, 2018
-
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

2 replies

Posts
2
Registration date
Thursday March 28, 2013
Status
Member
Last seen
March 28, 2013

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?
Posts
2368
Registration date
Sunday September 23, 2012
Status
Member
Last seen
December 13, 2018
45
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.