Excel VBA set multiple cells to the same value

前端 未结 4 1220
栀梦
栀梦 2021-01-05 03:04

I want to set every eighth cell on one worksheet to the value of a cell in another worksheet. I wrote this here:

Sub xx()
    For i = 5 To 45 Step 8
                 


        
4条回答
  •  孤城傲影
    2021-01-05 03:50

    This option of setting the same value for several cells was not yet mentioned:

    ActiveSheet.Range("A1,B2,C3:D4").Value = "SomeValue"
    

提交回复
热议问题