+ Reply to Thread
Results 1 to 8 of 8

Exceeded IF nesting, what do i do?

  1. #1
    Registered User
    Join Date
    06-20-2018
    Location
    Trondheim, Norway
    MS-Off Ver
    2016
    Posts
    3

    Question Exceeded IF nesting, what do i do?

    Hi everyone, i have stumbled upon a problem while working in my spreadsheet.
    I am what i would call an experienced novice in excel mostly using IF/OR/AND functions while i work. But this time my IF nesting has come to an end since Excel will only accept 64 nested IF statements.
    I will try to describe what i want to achieve as simple as possible.

    I have a table that looks something like this:

    Partname:--------Partcode:

    AA123-------------10
    AB123-------------11
    AC123-------------12
    AD123-------------13
    and continues with up to 100 partnames and their codes

    What i want to achieve is in a new table (ex. a shopping list) when i write the part name in one of the columns in the new table that excel displays the corresponding partcode in the next column just like a multiple IFs command would do: Ex shown under:

    Shoppinglist:

    Partname i want to buy:--------Partcode for the item i want to buy:
    AA123---------------------------(Fetched from the database table)
    AB123---------------------------(Fetched from the database table)
    AF123---------------------------(Fetched from the database table)[/FORMULA]
    etc..


    Excel limits me my use of a massive IF string, is this possible to do easily?

    Any help is appreciated
    Last edited by mrgatsby; 06-20-2018 at 02:41 PM. Reason: tried making a table

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,387

    Re: Exceeded IF nesting, what do i do?

    Welcome to the forum!

    Have a look at either the VLOOKUP function or the INDEX MATCH combination:

    http://www.contextures.com/xlFunctions02.html

    http://www.contextures.com/xlFunctions03.html
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Exceeded IF nesting, what do i do?

    Hi, welcome to the forum

    Time to learn a new, and very useful, excel function...VLOOKUP

    Assuming your source data is on sheet1 A2:B100...
    =VLOOKUP(A2,sheet1!$A!2:$B$100,2,0)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Exceeded IF nesting, what do i do?

    Looks like you could use VLOOKUP.

    Let's you have the PartName/PartCode table on Sheet1 in A1:B10.

    If you had partnames on Sheet2 down column A you could use this formula in column B to return the partcodes.

    =VLOOKUP(A1, Sheet1!$A$1:$B$10, 2, 0)
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    06-20-2018
    Location
    Trondheim, Norway
    MS-Off Ver
    2016
    Posts
    3

    Re: Exceeded IF nesting, what do i do?

    Wow, thank you everyone for the warm welcome and help.

    I will try to look into VLOOKUP and INDEX MATCH and see what i can do

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Exceeded IF nesting, what do i do?

    Happy to help.

    VLOOKUP (and it's twin HLOOKUP) is the basic method for doing what you want, and where you know which column to use.

    INDEX/MATCH/MATCH is a bit more complex (not much), but is also much more versatile, if you know neither the row number nor column you want

  7. #7
    Registered User
    Join Date
    06-20-2018
    Location
    Trondheim, Norway
    MS-Off Ver
    2016
    Posts
    3

    Re: Exceeded IF nesting, what do i do?

    Cool, i tried the VLOOKUP command now and it works perfectly. Kudos and Karma to all of you!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Exceeded IF nesting, what do i do?

    Good stuff, INDEX/MATCH/MATCH is your next assignment lol

+ 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. Have I exceeded nesting limit
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-06-2005, 07:05 PM
  2. Have I exceeded nesting limit
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-06-2005, 05:05 PM
  3. Have I exceeded nesting limit
    By KeLee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. Have I exceeded nesting limit
    By KeLee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  5. [SOLVED] Have I exceeded nesting limit
    By KeLee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  6. Have I exceeded nesting limit
    By KeLee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  7. [SOLVED] Have I exceeded nesting limit
    By KeLee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. Have I exceeded nesting limit
    By KeLee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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