+ Reply to Thread
Results 1 to 8 of 8

Using " in an if statement

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Using " in an if statement

    I copied the formula I have in my spreadsheet to a module and am getting an error when I run the macro.

    This is my formula:
    Please Login or Register  to view this content.
    This is what my macro looks like:

    Please Login or Register  to view this content.
    Error is - Compile error: Syntax error

    I also tried:

    Please Login or Register  to view this content.
    Error is - Application-defined or object-defined error

    The formula is in cell I19 which is merged with J19, K19, and L19, I wasn't sure if this had any barring.

    Thanks for the help.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Using " in an if statement

    Try this:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Using " in an if statement

    Hi, 288enzo,

    double up the marks like
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Using " in an if statement

    Wrong assumption
    Last edited by AB33; 07-14-2014 at 03:01 PM.

  5. #5
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Using " in an if statement

    Quote Originally Posted by AB33 View Post
    Wrong assumption
    I'm not sure who this is directed to as no one has mentioned anything about making an assumption. The constructive criticism isn't helpful.

  6. #6
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Using " in an if statement

    Quote Originally Posted by ConneXionLost View Post
    Try this:

    Please Login or Register  to view this content.
    Thank you, very helful. Makes perfect sense.

  7. #7
    Registered User
    Join Date
    03-21-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Using " in an if statement

    Quote Originally Posted by HaHoBe View Post
    Hi, 288enzo,

    double up the marks like
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Thank you Holger.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Using " in an if statement

    288enzo,
    It was not directed at you. It was my own wrong assumption, hence for deleting the code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How do I do incorporate an "if statement" with the ".find" method in a range?
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2014, 08:14 PM
  2. "If statement" works, but not "select case". What am I doing wrong?
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2014, 12:39 PM
  3. Replies: 12
    Last Post: 06-12-2014, 02:11 PM
  4. [SOLVED] Cell Color with"if" statement testing for a "text" value
    By ARocketScientist in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2014, 09:01 PM
  5. Replies: 3
    Last Post: 12-14-2006, 01:36 PM

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