i want update columns("b") of numbers +30%
know have solutions vba "loop" or adodb "update query", reason can use excel formula.
so, wrote vba code
columns("b").formulalocal = "=indirect(address(row(), column()))*1.3"
and got "0" in columns("b"). know formula may case "circular reference" problem, there way calculate "*1.3" once?...thx
you can use pastespecial
multiple values.
sub dirtyupdate() dim temp variant range("a1") temp = .value .value = 1.3 .copy intersect(columns("b"), activesheet.usedrange).pastespecial paste:=xlpasteall, _ operation:=xlmultiply, skipblanks:=false, transpose:=false .value = temp end end sub
Comments
Post a Comment