I want to update a columns("B") of numbers to +30%
I know I have solutions like a VBA "Loop" or an ADODB "UPDATE Query", But for some reason I can only use Excel Formula.
So, I wrote VBA code like
Columns("B").FormulaLocal = "=INDIRECT(ADDRESS(ROW(), COLUMN()))*1.3"
And I got all "0" in Columns("B"). I know the formula may case "circular reference" problem, but is there a way to calculate "*1.3" only once?...Thx
PasteSpecial
to multiple the values.Sub DirtyUpdate()
Dim temp As Variant
With 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 With
End Sub
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments