Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 986 Bytes

Excel.Range.MergeCells.md

File metadata and controls

44 lines (27 loc) · 986 Bytes
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.MergeCells property (Excel)
vbaxl10.chm144161
vbaxl10.chm144161
Excel.Range.MergeCells
42904357-5e55-1eb0-9b06-83b446fc6275
05/11/2019
medium

Range.MergeCells property (Excel)

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

Syntax

expression.MergeCells

expression A variable that represents a Range object.

Remarks

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.

Example

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

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

[!includeSupport and feedback]