Excel VBA set multiple cells to the same value -
i want set every eighth cell on 1 worksheet value of cell in worksheet. wrote here:
sub xx() = 5 45 step 8 set thisworkbook.sheets("sheet5").cells(i, 3).value = thisworkbook.sheets("sheet7").cells(13, 31).value next end sub
if try run it, gives me subscript out of range error. sheet5 has been named binomial sheet, have reference differently? there other ways accomplish this?
this option of setting same value several cells not yet mentioned:
activesheet.range("a1,b2,c3:d4").value = "somevalue"
Comments
Post a Comment