Untuk meng-unmerge semua merged cells, bisa langsung (tanpa perlu cari) dengan
:
sheets("nama worksheetnya").cells.unmerge
Jika ingin cari mana yang di-merge
Public Sub MergedCellsInfo()
Dim rng As Range, rngRes As Range
Dim lCount As Long
For Each rng In ActiveSheet.UsedRange
If rng.MergeCells Then 'kalau
ketemu merge cells
'mau diapain ?
'contoh : mau buat daftar range yang di-merge
If rngRes Is Nothing Then
lCount = 1
Set rngRes = rng.MergeArea
End If
If Intersect(rng, rngRes) Is Nothing Then
lCount = lCount + 1
Set rngRes = Union(rngRes, rng.MergeArea)
End If
End If
Next rng
MsgBox "Jumlah area merge cells : " & lCount & vbCrLf & _
"Jumlah cell yang termerge : " & rngRes.Count & vbCrLf & _
"Range yang di-merge : " & rngRes.Address
End Sub
Wassalam,
Kid.
2012/10/23 rodhy hakim <[email protected]>
> **
>
>
> Dear Master,
> Bagaimana Macro untuk Mencari Cell yang di Marge Kemudian di UnMarge di
> Excel.
> Sebelumnya saya ucapkan terima kasih,
>
>
>
> Salam,
> Odhy
>
> _
>