Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MergeCells Property
Collapse the table of content
Expand the table of content

Range.MergeCells Property

Office 2007
True if the range contains merged cells. Read/write Variant.



expression   A variable that represents a Range object.


When you select a range that contains merged cells, the resulting selection may be different from the intended selection. Use the Address property to check the address of the selected range.


This example sets the value of the merged range that contains cell A3.

Visual Basic for Applications
Set ma = Range("a3").MergeArea
If Range("a3").MergeCells Then
    ma.Cells(1, 1).Value = "42"
End If

Community Additions

© 2015 Microsoft