LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Excel inserts single quote marks into formula

When I use vba to insert this formula:
Sub Macro1()
ActiveCell.FormulaR1C1 = "=IF(F12=0," & Chr(34) & Chr(34) & Chr(34) &
Chr(34) & ",IF(F12<0.3,0.3-F12," & Chr(34) & Chr(34) & Chr(34) & Chr(34) &
"))"

End Sub
I get this result:
=IF('F12'=0,"""",IF('F12'<0.3,0.3-'F12',""""))

How do I stop Excel from inserting the single quotation marks?

Cheers,
Max


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paired Quote marks in Excel IF statement mjwskier Excel Worksheet Functions 2 August 28th 09 09:14 PM
Writing formula to include quote marks in result Valerie Excel Worksheet Functions 4 February 18th 09 10:01 PM
Unwanted single quote displayed in Formula bar Joe Excel Discussion (Misc queries) 21 May 1st 07 03:29 AM
Quote marks in Formulas passed from VB Script in Excel Graysailor Excel Worksheet Functions 2 September 26th 06 07:29 PM
How to keep quote marks for CSV in excel Matt Excel Discussion (Misc queries) 0 August 1st 06 12:30 AM


All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"