Dim c As Range Set c = Thisworkbook.Worksheet("Sheet1").Range("A1") If c.MergeCells Then MsgBox "結合されています。" If c.Areas.Count = 1 And c.Count = 1 Then MsgBox "選択セルは1つです。" If c.Interior.ColorIndex >= 0 Then "背景色が設定されています。" Set c = Nothing
Dim c As Range Set c = Thisworkbook.Worksheet("Sheet1").Range("A1") If c.MergeCells Then MsgBox "結合されています。" If c.Areas.Count = 1 And c.Count = 1 Then MsgBox "選択セルは1つです。" If c.Interior.ColorIndex >= 0 Then "背景色が設定されています。" Set c = Nothing