+ Reply to Thread
Results 1 to 4 of 4

IF(LEFT) formula.

  1. #1
    Registered User
    Join Date
    12-02-2019
    Location
    Sydney, Australia
    MS-Off Ver
    2016 i think
    Posts
    11

    IF(LEFT) formula.

    Sorry to be a pain, as i already posted today. But as i knew the other formulas, thought it would be ok. Thought i could use 3 different formulas in the one cell. I need to pick up ONLY the first digit. Every formula ive tried from google to use multiple numbers etc just isnt working.
    Any code in the cell that starts with a 4 or 6 needs to read RAIL, the rest to read ROAD. I can only pick up the number 4, not the number 6.

    Current formula =IF(B2="","",IF(LEFT(B2)="4","RAIL","ROAD"))

  2. #2
    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,916

    Re: IF(LEFT) formula.

    Try this:

    =IF(B2="","",IF(OR(LEFT(B2)="4",LEFT(B2)="6"),"RAIL","ROAD"))
    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.

  3. #3
    Registered User
    Join Date
    12-02-2019
    Location
    Sydney, Australia
    MS-Off Ver
    2016 i think
    Posts
    11

    Re: IF(LEFT) formula.

    thankyou heaps. it works. looking at that, i was putting if(left) for both formulas, or forgetting the 2nd LEFT when i did the OR function.

  4. #4
    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,916

    Re: IF(LEFT) formula.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    You need to go and say thanks in the other thread, too.

+ 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. Formula to move data to Left when LEFT cell is blank?
    By wer5150 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2019, 05:26 AM
  2. Formula to move data to Left when LEFT cell is blank?
    By wer5150 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-31-2019, 05:22 AM
  3. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  4. Replies: 6
    Last Post: 06-26-2017, 09:04 PM
  5. [SOLVED] Using Countif formula on cells that have a Left formula
    By fsoares22 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-10-2013, 11:13 AM
  6. Right and Left Formula
    By Raymond in forum Excel General
    Replies: 6
    Last Post: 05-25-2005, 04:06 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