+ Reply to Thread
Results 1 to 4 of 4

If statement on Left(string) not working

  1. #1
    Registered User
    Join Date
    07-26-2010
    Location
    NL
    MS-Off Ver
    Excel 2016
    Posts
    69

    If statement on Left(string) not working

    Hi,

    I'm writing some code to 'read' specific folder in my outlook, this folders contains automated notifications, I've got the part to read the body of the mail working.
    Now I'm trying to find multiples lines in this email that starts with a specific value ('SELF') and do something with the info in that line.

    My question: why can I extract every line to a single row, but not use the an if statement on that same line?

    Please Login or Register  to view this content.
    TIA for your help.

    ABBOV

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    15,239

    Re: If statement on Left(string) not working

    Not single quote, double
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    4,497

    Re: If statement on Left(string) not working

    Don't know the content of the strings resulting from the split, so it is hard to evaluate. That said, your code as it stands won't even compile, since 'SELF' should have double not single quotes: "SELF"
    Beyond that, if you can tell me what the text in cell(2,3) is then I can look more in depth at why the if statement "fails".
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    07-26-2010
    Location
    NL
    MS-Off Ver
    Excel 2016
    Posts
    69

    Re: If statement on Left(string) not working

    Quote Originally Posted by jindon View Post
    Not single quote, double
    Please Login or Register  to view this content.
    pff, must be the heat...
    The statement works fine with the double quotes.

    Thanks for the insight

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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