I'm using code similar to this to enter some formula's:-
In reality I'm populating 25 columns (different formulas) using this method which means I'm repeating the same piece of code.
I was wondering if there was a simpler way?
Code:
Sub test()
With Range("D2:D28008")
.Formula = "=B2*C2"
.Value = .Value
End With
With Range("E2:E28008")
.Formula = "=vlookup(B2,TestData,5,false)"
.Value = .Value
End With
With Range("F2:F28008")
.Formula = "=B2*A2+3.658"
.Value = .Value
End With
End Sub
In reality I'm populating 25 columns (different formulas) using this method which means I'm repeating the same piece of code.
I was wondering if there was a simpler way?
Last edited by a moderator: