Bharat Guru
asked on
excel vba how to add formula
I'm getting error when I assign below formula to field A21
Run time error 1004
Application defined or object defined error
Range("A21").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(A2,Sheet2!$A$10: $R$90,3,FA LSE)"
Range("A21").Select
If I apply same formula manually on cell A21 by pressing F2 the commend works.
Run time error 1004
Application defined or object defined error
Range("A21").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(A2,Sheet2!$A$10:
Range("A21").Select
If I apply same formula manually on cell A21 by pressing F2 the commend works.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Looks like a split-second clash of experts :)
ASKER
Thanks
ASKER
Thanks
If you want to assign that formula you should just use the 'mycell.formula' property