kyouyanのブログ -3ページ目

kyouyanのブログ

SE 技術 備忘録です。自分用です。

結合されているかいなか

Sub Sample2()
Dim i As Long, buf As String
For i = 2 To 9
If Cells(i, 1).MergeCells Then
buf = buf & Cells(i, 1).Address(0, 0) & "-->結合されています" & vbCrLf
Else
buf = buf & Cells(i, 1).Address(0, 0) & "-->結合されていません" & vbCrLf
End If
Next i
MsgBox buf
End Sub