「Excel VBA」For Each文でセルに対して範囲で入力するサンプル
書式
For Each 変数 In コレクションや配列
some code
Next
使用例
Sub sample()
Dim ss As Range
For Each ss In Range("B2:C7")
ss.Value = "456"
Next
End Sub
Coding Changes the World
書式
For Each 変数 In コレクションや配列
some code
Next
使用例
Sub sample()
Dim ss As Range
For Each ss In Range("B2:C7")
ss.Value = "456"
Next
End Sub