+ Reply to Thread
Results 1 to 5 of 5

Passing a function from VB with text strings in quotation marks

Hybrid View

  1. #1
    Max
    Guest

    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. #2
    Executor
    Guest

    Re: 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. #3
    Max
    Guest

    Re: 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
    >
    >


  4. #4
    Max
    Guest

    Re: 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
    > >
    > >


  5. #5
    Bob Phillips
    Guest

    Re: 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" <Max@discussions.microsoft.com> wrote in message
    news:D85C44A8-74E8-4BA0-AF9C-6373EA538C7F@microsoft.com...
    > 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




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1