Thread: If Then
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Paul Paul is offline
external usenet poster
 
Posts: 49
Default If Then

If you mean put this formula in F2 with VBA given a value of 1 in A2.


Sub EnterValueInF2()

If Range("A2").value=1 then
Range("F2").Formula= "=B2*12*0.67"
End if
End Sub

Paul


"Jamesbfagan" wrote in message
...
How would I program the following formula?

If A2=1 Then F2=B2*12*.67