sub button53_click() dim rowsvalue integer dim rowsnum integer rowsvalue = sheet1.range("c38").value rowsnum = math.round(rowsvalue / 20, 1) k = 0 counter = 16 46 worksheets("single l angle").cells("f", counter).value = rowsnum * k k = k + 1 next counter end sub
i cant figure out, trying make vb code takes value cell "c38", divides 20 , pastes values in cells f16 -> f36. far fine, when comes to:
worksheets("single l angle").cells("f", counter).value = rowsnum * k
i keep getting mismatch 13 errors.
you can use
worksheets("single l angle").cells(counter,6) = rowsnum * k
or
worksheets("single l angle").range("f" & format(counter)).value = rowsnum * k
Comments
Post a Comment