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: 27,285
Default Using Quotation Marks in Arguments

Worksheets("S1").Range("C3").Value = "=IF(South!G16 = """", """",
South!G16)"
Worksheets("S1").Range("C5").Value = "=IF(MidWest!G16 = """", """",
MidWest!G16)"
Worksheets("S1").Range("C7").Value = "=IF(West!G16 = """", """", West!G16)"


Often good to test in the immediate window:

? "=IF(West!G16 = """", """", West!G16)"
=IF(West!G16 = "", "", West!G16)

you need to double up on double quotes interior to a string.

--
Regards,
Tom Ogilvy

"Dawg House Inc" wrote in message
...
I have three option buttons, and pending on which one is selected, I need

to
update three related cells with the appropriate formula. I have this
currently, but its not working properly:

Worksheets("S1").Range("C3").Value = "=IF(South!G16 = "", "", South!G16)"
Worksheets("S1").Range("C5").Value = "=IF(MidWest!G16 = "", "",

MidWest!G16)"
Worksheets("S1").Range("C7").Value = "=IF(West!G16 = "", "", West!G16)"

This results in the formula in the cell ending up like this:
=IF(South!G16 = ", ", South!G16)
=IF(MidWest!G16 = ", ", MidWest!G16)
=IF(West!G16 = ", ", West!G16)

I WANT the result to be this:
=IF(South!G16 = "", "", South!G16)
=IF(MidWest!G16 = "", "", MidWest!G16)
=IF(West!G16 = "", "", West!G16)

Any suggestions would be greatly appreciated.
--
Dawg House Inc.
"We live in it, therefore, we know it!"



 
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
Quotation Marks 9pluck9 Excel Discussion (Misc queries) 2 May 2nd 07 04:40 PM
without quotation marks? jfazz Excel Discussion (Misc queries) 1 March 2nd 06 04:43 PM
quotation marks JohnF Excel Worksheet Functions 7 February 5th 06 09:33 PM
quotation marks Hippy Excel Programming 2 November 4th 05 11:05 PM
Passing string arguments that have quotation marks in them Caro-Kann Defence[_2_] Excel Programming 2 April 21st 05 03:26 PM


All times are GMT +1. The time now is 10:21 AM.

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"