View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
marcus[_3_] marcus[_3_] is offline
external usenet poster
 
Posts: 140
Default Columns other than one selected by macro being erroneouslyselecte

Hi Michael

It would appear that your merged cells run right through column H.
This is why so many columns are selected. Most likely it is at the
headings in ROW 1 where this is happening so, assuming your merged
cells occur in Row 1 the following will highlight all the used cells
from H2 to the bottom of your dataset.

Sub SelColH()
Dim lw As Integer
lw = Range("H" & Rows.Count).End(xlUp).Row
Range("H2:H" & lw).Select
End Sub


If in the middle of your dataset, you have a heap of merged cells that
run through Column H then I suggest you unmerge those cells. You can
almost always replicate the appearance of merged Cells without
merging.

Hope this helps.

Marcus