Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
Can anyone help me with a workaround for this line of code? Range("r2").Formula = "=IF(Q2="w",(P2*(E2-1)*0.95),-P2)" When the compiler gets to the "w" part of the formula it's expecting "w" to be a variable or something as it sees me as closing this part "=IF(Q2=" I'm sure there's a simple explanation that I'm overlooking? Any help or pointers appreciated Ron |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For quotes within quotes, use two quotes
Range("r2").Formula = "=IF(Q2=""w"",(P2*(E2-1)*0.95),-P2)" -- Kind regards, Niek Otten "Ron" wrote in message ... Hi all, Can anyone help me with a workaround for this line of code? Range("r2").Formula = "=IF(Q2="w",(P2*(E2-1)*0.95),-P2)" When the compiler gets to the "w" part of the formula it's expecting "w" to be a variable or something as it sees me as closing this part "=IF(Q2=" I'm sure there's a simple explanation that I'm overlooking? Any help or pointers appreciated Ron |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Niek,
Ecellent, thankyou very much. Ron "Niek Otten" wrote in news:#T$uQhD8FHA.2816 @tk2msftngp13.phx.gbl: For quotes within quotes, use two quotes Range("r2").Formula = "=IF(Q2=""w"",(P2*(E2-1)*0.95),-P2)" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Entering Formulas | Excel Worksheet Functions | |||
Entering Formulas | Excel Discussion (Misc queries) | |||
Entering Formulas | Excel Worksheet Functions | |||
Entering formulas | Excel Worksheet Functions | |||
Entering Formulas in VBA | Excel Programming |