+ Reply to Thread
Results 1 to 8 of 8

Nested IF Functions

  1. #1
    Registered User
    Join Date
    09-26-2009
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Nested IF Functions

    I am having trouble reducing the number of If functions in my formula. What I am trying to do is to be able to pull out a name from a database in a different excel file using two different codes. For example if Toys has two codes 1a and 1b and if I type either of those in my spreadsheet it will go to the database and display toys. Right now i am using if, index and match to accomplish this task.
    Last edited by Chemucla; 10-14-2009 at 04:16 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Nested IF Functions

    Welcome to the forum. Post an example workbook and explain in context.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Nested IF Functions

    Hi Chemucla, welcome to the forum.

    If you'll mockup a sample workbook showing the dilemma and examples of your desired results, point out where the results came from if not obvious in your sample data, I'm sure we can be of help.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    09-26-2009
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Nested IF Functions

    Sorry about the long wait I have been busy at work. Attached is an example of what I am trying to do. In the workbook sheet one contains a list of items and it can be referred to using two ids similary sheet two contains a list of colors which can also be referred to using two ids. On sheet three I have the formula to give be the item or color depending what i input into cell B4. Using either of the ids for each item or color I should get the correct name back, which I do. If i have four sheets with different items then their are too many nested if functions and excel has problems with my equation. Is there a simpler cleaner method of achieveing what I am trying to do.

    Again thanks for your quick replys.

    Thanks,

    Carlos
    Attached Files Attached Files

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Nested IF Functions

    You're problem appears to be expanding.

    1) The data to search is actually in a separate workbook, isn't it? You stated that in your original post
    2) The data is now starting to spread across multiple worksheets, from the post above?

    INDEX/MATCH is the correct approach, but your data layout is not. I have to encourage you to either:

    1) Organize all your data onto one sheet with the codes in one column and the resulting strings in another...one big set of data, or

    2) Leave you current sheets, but create another sheet in that workbook that organizes all the data from the other sheets in the manner I have described in #1.

    The main goal is to give your activity cell A4 one set of data to look at in the end.
    Last edited by JBeaucaire; 10-14-2009 at 04:47 PM.

  6. #6
    Registered User
    Join Date
    09-26-2009
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Nested IF Functions

    Hi JBeaucaire,

    You are correct the database is another file and the data in the database is in multiple worksheets. The problem is that we would like to keep it organized among different worksheets. So what you are recommending is that we combine all our products onto one sheet in that file to look? Is there no other way around the IF function nesting issue besides consolidating the entire database?

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Nested IF Functions

    Option #2 has you maintaining your separate sheets for whatever reason that might be, AND having a method that creates a "searchable" single sheet out of those sheets. I've actually used ws_event macros to accomplish that whenever I've needed.

    Then use that consolidated sheet when referring to the data remotely.

  8. #8
    Registered User
    Join Date
    09-26-2009
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Nested IF Functions

    Thank you for all your help I really appreciate it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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