+ Reply to Thread
Results 1 to 10 of 10

IF(LEFT Statement

  1. #1
    Registered User
    Join Date
    04-09-2016
    Location
    new york
    MS-Off Ver
    Excel Mac 2011
    Posts
    4

    IF(LEFT Statement

    I am trying to use the IF(LEFT( function to identify cells that start with specific words. For example, I want to identify cells with "French" but not cells with "French nightlife" Right now my statement =IF(LEFT(A1,6)="french","yes","no") returns yes for all cells that start with French. Does anyone know another statement I can try so that it only identifies cells with exactly the phrase I am interested in? Thanks.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF(LEFT Statement

    Post SEVERAL examples and tell us what results you expect.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: IF(LEFT Statement

    Are you looking for cells that contain only the word "French"? If not, then you would need to build some sort of complicated exclusion into the formula.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: IF(LEFT Statement

    If you are just looking for a single word and that is all that is in the cell, you shouldn't need to use the LEFT function.

    If you just put =IF(A1="French","Yes","No") this checks for an exact match to the word you want.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: IF(LEFT Statement

    Maybe something like this

    Enter in B1 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v A B C
    1 French Yes French
    2 French nightlife No
    3 French bread No
    4
    5
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF(LEFT Statement

    Quote Originally Posted by AlKey View Post
    =IF(A1<>"",IF(AND(ISNUMBER(SEARCH(C$1,A1)),LEN(A1)=LEN(C$1)),"Yes","No"),"")
    That's the fancy version of this:

    =IF(A1="French","Yes","No")


  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: IF(LEFT Statement

    Quote Originally Posted by Tony Valko View Post
    That's the fancy version of this:

    =IF(A1="French","Yes","No")

    Lol! here is less fancy

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-26-2016
    Location
    São Paulo - Brazil
    MS-Off Ver
    2016
    Posts
    48

    Re: IF(LEFT Statement

    DLG415

    Using the example of AlKey, Enter in B1 and copy down this formula, = IF(C5>"",IF(C5=E5,"YES","NO"),""), get the same result, of course if that is desired, or else is a sample as either the result.

    trying to help

    Decio, excuses, Using Google Translator

  9. #9
    Registered User
    Join Date
    04-09-2016
    Location
    new york
    MS-Off Ver
    Excel Mac 2011
    Posts
    4

    Re: IF(LEFT Statement

    Awesome! Thanks everyone. It looks like there are a couple ways to do it.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF(LEFT Statement

    You're welcome. We appreciate the feedback!

+ 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. if statement using left and right conditions
    By Set_Shot_Dave in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-22-2021, 04:18 PM
  2. If left statement not working
    By snsman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-22-2015, 07:46 AM
  3. If/or statement with a left function if false
    By mcranda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-22-2015, 04:07 PM
  4. [SOLVED] Help with IF Formula with Embeded LEFT Statement
    By financeanalyst in forum Excel General
    Replies: 3
    Last Post: 04-03-2014, 05:14 PM
  5. Replies: 3
    Last Post: 09-19-2013, 11:24 AM
  6. Using a LEFT Function inside of an IF Statement
    By Squirt03 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2013, 01:04 AM
  7. Color code cell with case statement and datestamp cell(s) to the left
    By garricko in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-26-2010, 08:37 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