+ 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
    74

    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 O.365
    Posts
    22,516

    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
    Office 365
    Posts
    5,059

    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
    74

    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)

Similar Threads

  1. [SOLVED] Replace Characters to Left of a String with Another String/Character
    By stevoDE in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-06-2019, 02:43 AM
  2. IF(LEFT Statement
    By DLG415 in forum Excel General
    Replies: 9
    Last Post: 04-09-2016, 04:02 PM
  3. If left statement not working
    By snsman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-22-2015, 07:46 AM
  4. [SOLVED] String Move from Left to Right
    By Echo_711 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-06-2014, 11:17 PM
  5. [SOLVED] Insert a zero on the left of a string?
    By dwest100 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-22-2014, 06:12 PM
  6. [SOLVED] String Function not working when an IF statement is present
    By MWE2012 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 05-02-2013, 08:56 PM
  7. Left and right side of string?
    By Sasolini in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2005, 08:15 AM

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