ActiveCell.Formula

L

Leif Ramussen

Hi
How on earth do I make the following formula to function ?

TempNumber=15
ActiveCell.FormulaR1C1 = "= TempNumber*R[-2]C"

I have tried val() and different combinations of & and "

Hobe somebody will reply.

Kind regards
Leif Rasmussen
 
J

J.E. McGimpsey

One way:

TempNumber=15
ActiveCell.FormulaR1C1 = "= " & TempNumber & "*R[-2]C"
 
Top