View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Detecting merged cells

Use the MergeArea property to determine whether a cell is merged.

If ActiveCell.MergeArea.Address < ActiveCell.Address Then
Debug.Print "Cell merged"
Else
Debug.Print "Cell not merged"
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"microsoft" wrote in message
...
I have written a macro that searches a worksheet for lines of

data that are
missing data from one column. It works except for when it

reaches a header
half way down the sheet that is a merged cell 5 cells wide. It

treats this
as 1 cell and so my conting system goes ary. How do you either

deal with
this or detect the fact that the activecell is part of a merged

group of
cells?

I am new to this so don't worry about explaining in simple

terms.

Thanks in advance