Skip to main content

Range.UnMerge method

Table of contents
  1. Syntax
  2. Example

Separates a merged area into individual cells.

Syntax

expression.UnMerge

expression A variable that represents a Range object.

Example

This example separates the merged range that contains cell A3.

With Range("a3")
    If .MergeCells Then
        .MergeArea.UnMerge
    Else
        MsgBox "not merged"
    End If
End With

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>