+ Reply to Thread
Results 1 to 5 of 5

Multiple IF's & Index/Match - Not working properly

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    80

    Question Multiple IF's & Index/Match - Not working properly

    I am attempting to return an Index/Match result (from another worksheet "Depts & Codes), based on the text value in cell (D7) and cell (C18). The variable (or problem) seems to exist in D7 --- the value will be either "Temp" or "Active".

    Based on the current formula I'm using (shown below), if D7 = "Temp", it returns the expected result, but if D7 ="Active", it returns "False" (not what I want).

    =IF($C18="","",IF($D$7="Temp",INDEX('Depts & Codes'!$F$19:$F$50,MATCH($C18,'Depts & Codes'!$C$19:$C$50),IF(D7="Active",INDEX('Depts & Codes'!$D$19:$D$50,MATCH($C18,'Depts & Codes'!$C$19:$C$50,0))))))

    I've also tried the following without success:
    =IF($C18="","",IF($D$7="Temp",INDEX('Depts & Codes'!$F$19:$F$50,MATCH($C18,'Depts & Codes'!$C$19:$C$50,INDEX('Depts & Codes'!$D$19:$D$50,MATCH($C18,'Depts & Codes'!$C$19:$C$50,0))))))


    The "Active" & "Temp" criteria is something new I've added to my original formula (shown below and in cell F24) - but I just can't get it to work properly with the new criteria.
    =IF($C24="","",INDEX('Depts & Codes'!$D$19:$D$32,MATCH($C24,'Depts & Codes'!$C$19:$C$32,0)))

    Am I missing something obvious? I've attached a sample of my workbook (note: I have links to another workbook, which may not properly function on your end - but I don't think this should affect the current issue)

    Any help would be appreciated. Thanks so much!
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Multiple IF's & Index/Match - Not working properly

    You are missing a paren to close the first index.

    =IF($C18="","",IF($D$7="Temp",INDEX('Depts & Codes'!$F$19:$F$50,MATCH($C18,'Depts & Codes'!$C$19:$C$50)),IF(D7="Active",INDEX('Depts & Codes'!$D$19:$D$50,MATCH($C18,'Depts & Codes'!$C$19:$C$50,0)))))
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Multiple IF's & Index/Match - Not working properly

    Your inner IF does not have an action_if_false term, i.e.:

    ... IF(D7="Active",INDEX('Depts & Codes'!$D$19:$D$50,MATCH($C18,'Depts & Codes'!$C$19:$C$50,0)),action_if_false term here) ...

    so that you can tell Excel what you want instead of FALSE.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    80

    Re: Multiple IF's & Index/Match - Not working properly

    Yup - that was it!! I knew it had to something simple (of course)!!!

    Thanks so much (and yes, I feel like an idiot again!) LOL

  5. #5
    Registered User
    Join Date
    04-16-2013
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    80

    Re: Multiple IF's & Index/Match - Not working properly

    Thanks Pete - actually daffodil11 provided the solution that seems to be working. I appreciate you looking at it and attempting to help. Much appreciated!

+ 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. Correct/Working (Index,Match) formula not working between cells
    By barnerd in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-11-2014, 01:20 PM
  2. [SOLVED] Index Match Multiple Criteria not working
    By garciapliz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-22-2013, 12:07 PM
  3. Replies: 2
    Last Post: 05-24-2013, 09:32 AM
  4. [SOLVED] INDEX/MATCH not working for multiple criteria
    By lukesanborn in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-27-2012, 09:20 PM
  5. Replies: 0
    Last Post: 10-10-2011, 07:29 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