Cells are Merged. How to know where to where???

  • Thread starter Thread starter musa.biralo
  • Start date Start date
M

musa.biralo

Hi,
i have a merged cells say (a1 to b5). Now i am trying to know,

1) whether the cell is merged or not
2) if merged, where to where, from which cell to which cell

Your help will highly be appreciated.

Huge Thanks

musa.biralo
 
Dim cell As Range
Dim coll As Collection
Dim collItem


Set coll = New Collection
For Each cell In Range("A1:B5")
On Error Resume Next
If cell.MergeCells Then
coll.Add cell.MergeArea.Address(False, False), _
cell.MergeArea.Address(False, False)
End If
On Error GoTo 0
Next cell

For Each collItem In coll
MsgBox collItem
Next collItem


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
Hey Bob,

Thank so much...this is more than what i was expecting....Great Help.

Thanks again
musa.biralo
 
Back
Top