Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Passing a function from VB with text strings in quotation marks

Hi,

I'm trying to pass this function to a cell within VB:

=IF(ISERR(VLOOKUP(U2,'Anderson List'!$A$3:$F$1945,1))=TRUE,\" \ MISSING \
"\,IF(VLOOKUP(U2,'Anderson List'!$A$3:$F$1945,1)=U2,\" \ OK \
"\,VLOOKUP(U2,'Anderson List'!$A$3:$F$1945,1)))

but with the quotation marks foul things up. How do I pass the quotes?

Thanks!
--
Thanks!
Max
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Passing a function from VB with text strings in quotation marks

Hi Max,

Repalce \"\ with ""

e.g.

Range("A1").Formula="=If(TRUE,""First"",""Second"" )"


Hoop This Helps,


Executor

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Passing a function from VB with text strings in quotation marks

double up on them, but only the double-quotes.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Max" wrote in message
...
Hi,

I'm trying to pass this function to a cell within VB:

=IF(ISERR(VLOOKUP(U2,'Anderson List'!$A$3:$F$1945,1))=TRUE,\" \ MISSING \
"\,IF(VLOOKUP(U2,'Anderson List'!$A$3:$F$1945,1)=U2,\" \ OK \
"\,VLOOKUP(U2,'Anderson List'!$A$3:$F$1945,1)))

but with the quotation marks foul things up. How do I pass the quotes?

Thanks!
--
Thanks!
Max



  #4   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Passing a function from VB with text strings in quotation mark

Now I get a runtime error 1004 - hmmm... Any other ideas?


--
Thanks!
Max


"Executor" wrote:

Hi Max,

Repalce \"\ with ""

e.g.

Range("A1").Formula="=If(TRUE,""First"",""Second"" )"


Hoop This Helps,


Executor


  #5   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Passing a function from VB with text strings in quotation mark

Nevermind - I figured it out why! Sometimes you just need to step back a
bit. Thanks for the help!
--
Thanks!
Max


"Max" wrote:

Now I get a runtime error 1004 - hmmm... Any other ideas?


--
Thanks!
Max


"Executor" wrote:

Hi Max,

Repalce \"\ with ""

e.g.

Range("A1").Formula="=If(TRUE,""First"",""Second"" )"


Hoop This Helps,


Executor


Reply
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 as Text Kelly C Excel Discussion (Misc queries) 2 August 3rd 08 06:20 PM
Generating text surrounded by quotation marks AaronQRules (a.k.a. Jeff) Excel Discussion (Misc queries) 5 July 30th 07 08:12 PM
Finding Quotation marks in Search function ahearn Excel Worksheet Functions 6 May 11th 06 12:00 AM
Passing string arguments that have quotation marks in them Caro-Kann Defence[_2_] Excel Programming 2 April 21st 05 03:26 PM
How do I concatenate text that actually contains quotation marks? Excel Distress Excel Worksheet Functions 3 April 15th 05 02:23 PM


All times are GMT +1. The time now is 01:25 PM.

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

About Us

"It's about Microsoft Excel"