merged cells

  • Thread starter Thread starter Casc
  • Start date Start date
C

Casc

I want to check the property of a cell to see if it is
merged. Does anybody know how to write the code for this?

Thanks
Casc
 
Sub aa_tester6()
Dim rng As Range
Set rng = Range("A1")
If rng.MergeCells Then
MsgBox rng.Address & " is in the merged area " _
& rng.MergeArea.Address
Else
MsgBox rng.Address & " is not in a merged area"
End If
End Sub
 
Back
Top