Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quotes in formula
I am trying to put a formula into excel using the
following VBA code. I am having problems getting the quotes around "sp50.R". Quotes need to show up in Excel, but I'm not sure how to make them appear. DateToUse = ActiveCell.Offset(0, -4).Value ActiveCell.Formula = "^=(100*(RELATIVE ("sp50.R",1+P_TOTAL_RETURNC(" & DateToUse & ",0)/100)-1)) +100" ActiveCell.Offset(1, 0).Select Thank you! Kevin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quotes in formula
Quotes in VBA, like in XL strings, must be doubled:
ActiveCell.Formula = _ "=(100*(RELATIVE(""sp50.R"",1+P_TOTAL_RETURNC( " & _ DateToUse & ",0)/100)-1))+100" In article , "Kevin" wrote: I am trying to put a formula into excel using the following VBA code. I am having problems getting the quotes around "sp50.R". Quotes need to show up in Excel, but I'm not sure how to make them appear. DateToUse = ActiveCell.Offset(0, -4).Value ActiveCell.Formula = "^=(100*(RELATIVE ("sp50.R",1+P_TOTAL_RETURNC(" & DateToUse & ",0)/100)-1)) +100" ActiveCell.Offset(1, 0).Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where to put quotes in a SUMIF formula and when is & used for cell | Excel Discussion (Misc queries) | |||
change straight quotes to curly quotes | Excel Discussion (Misc queries) | |||
displaying output of a formula to be in double quotes | Excel Worksheet Functions | |||
double quotes around string in formula craeted in vba | Excel Programming | |||
Formula with quotes and ampersand | Excel Programming |