+ Reply to Thread
Results 1 to 8 of 8

Nested IF(OR statements with text values

  1. #1
    Registered User
    Join Date
    03-28-2017
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Nested IF(OR statements with text values

    As an avid photographer of cars, I have decided to log down every interesting vehicle I've seen in this Excel table, so that when I get around to identifying them, I don't need to keep looking up their registration plate on the internet for further information, especially if I've seen them before. One of these aspects involves a regional identifier, which tells you where the car was registered.

    When I do a single IF statement, the area identifier works as intended.
    plate1.png
    As you can see, C2 is correctly identified as "Staffordshire" and C3 is correctly identified as "Leeds". The only problem is, there are over 400 of these, and Excel only allows up to 255 maximum nested statements. So I need a way to compress this into far fewer statements.
    plate2.png
    The second picture is ideally how I want both of these conditions to function, so that once I type in a car's regional identifier, it automatically gives me the correct area (depending on the plate's age) without me having to manually look it up. The only problem is, it considers this invalid. "BF" in this case should return "Birmingham", although for whatever reason it isn't. What I want to know is:
    • Is it even possible to nest multiple IF(OR statements together?
    • If so, where have I gone wrong?

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Nested IF(OR statements with text values

    Hi
    create a table somewhere with the identifier in one column and the Old Area in the second column then use VLOOKUP or an INDEX/MATCH combination in your formula to retrieve the Area

    ( in the future post a sample sheet instead of a picture so we can work on it)

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Nested IF(OR statements with text values

    Hi,

    You need to set up a two column table of unique values from the column C area identifiers and the mapping to th the new area identifier. Then use the VLOOKUP() function to find the column C value in the 2nd column of the lookup table.

    Upload the workbook if you want more specific help.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    03-28-2017
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Nested IF(OR statements with text values

    Ok, I've attached a modified copy of the workbook with part of the plate data scrubbed for privacy reasons, and also the relevant data I wish to populate the old/new area codes with (saved the webpages as .zips since I'm not allowed to link to them)

    - Jim
    Attached Files Attached Files

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Nested IF(OR statements with text values

    Does the attached help
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-28-2017
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Nested IF(OR statements with text values

    Quote Originally Posted by Richard Buttrey View Post
    Does the attached help
    Indeed it does, thank you very much! Knew there was a far easier way than making one huge formula, this helps immensely!

    - Jim

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Nested IF(OR statements with text values

    My pleasure & thanks for the rep.

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Nested IF(OR statements with text values

    Funny, post #2 offers the same explanation, but not even an acknowledgement

+ 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. Formatting text without millions of nested IF statements
    By labogola in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-09-2015, 08:42 AM
  2. Nested IF Statements Using Just Text - No Numbers
    By salhakim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-01-2015, 05:43 PM
  3. Alternative to multiple nested IF statements to SUM certain values
    By JTR616 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-24-2013, 06:23 PM
  4. [SOLVED] Nested IF statements to FIND text string and return set values.
    By stuartm4h in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-12-2013, 12:03 PM
  5. nested if statements to output text
    By tedk1967 in forum Excel General
    Replies: 4
    Last Post: 08-07-2011, 02:10 PM
  6. Excel 2007 : Nested IF Statements and string text
    By katharineb in forum Excel General
    Replies: 5
    Last Post: 07-22-2010, 05:20 PM
  7. Returning text from nested IF and Vlookup statements
    By Patricia in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-28-2006, 11:25 AM

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