+ Reply to Thread
Results 1 to 9 of 9

Lookup function with multiple criteria

  1. #1
    Forum Contributor
    Join Date
    02-14-2013
    Location
    Biloxi, Ms
    MS-Off Ver
    2013 or 2016
    Posts
    115

    Lookup function with multiple criteria

    I have a formula that I am using to draw a status from another table if it does not meet a specific criteria. Basically, look in the column to see if there is data, if there is then ignore it if that data reads "initial reject." If it doesn't read "initial reject" then return the value which would typically be "approved, rejected of in work." Now though there's been another criteria added that will need to be filtered out just like the initial reject which is "prev rev."

    Here is my current formula:

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Lookup function with multiple criteria

    {=IFERROR(INDEX(A128TP[STATUS],MATCH(TESTSTATUS[[#This Row],[TP NO]],IF(A128TP[STATUS]<>Or("INITIAL REJECT","Prev Rev"),A128TP[TP NO]),0)),"")}
    Don't just use the answers provided for you. Try to understand how it works by reverse engineering or asking about it.

    Please mark the thread as [SOLVED] (Thread Tools->Mark thread as Solved) when answered.
    If you're happy with an answer given, please click the * under the person's name to boost their reputation.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Lookup function with multiple criteria

    Quote Originally Posted by Craig K. View Post
    {=IFERROR(INDEX(A128TP[STATUS],MATCH(TESTSTATUS[[#This Row],[TP NO]],IF(A128TP[STATUS]<>Or("INITIAL REJECT","Prev Rev"),A128TP[TP NO]),0)),"")}
    Did you try that formula?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Lookup function with multiple criteria

    Tony, I tried deleting it right after I posted it. I realized too late that it is incorrect.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Lookup function with multiple criteria

    Whenever I need to do that I click the Edit Post button.

    Then I delete the offending text and replace it with a message something like this: Deleted content!

  6. #6
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Lookup function with multiple criteria

    Tony, I tried but my browser decided to mess with me regarding the 10 character min that the edit requires. Either way, I messed up and won't delete it now. It will forever be a mark of shame against my internet permanent record .

    Rajn - Tony was basically pointing out that my initial post won't work because the OR() function returns the binary value of True/False and will result in an error where I put it. This one has more thought put into it and I think it will work:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    02-14-2013
    Location
    Biloxi, Ms
    MS-Off Ver
    2013 or 2016
    Posts
    115

    Re: Lookup function with multiple criteria

    Quote Originally Posted by Craig K. View Post
    Tony, I tried but my browser decided to mess with me regarding the 10 character min that the edit requires. Either way, I messed up and won't delete it now. It will forever be a mark of shame against my internet permanent record .

    Rajn - Tony was basically pointing out that my initial post won't work because the OR() function returns the binary value of True/False and will result in an error where I put it. This one has more thought put into it and I think it will work:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I tried it and for some reason it is still returning the "PREV REV" & now also the "INITIAL REJECT." That's the same result I was getting before when I tried to modify it myself.

    As it seems, even if I click to edit the formula, but don't actually change it the cell starts picking up the "INITIAL REJECT" instead of the "APPROVED"

    It's been a while since I created this thing, so maybe I'm doing something incorrectly. Enter the new formula, then CTRL ENTER, correct?

  8. #8
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Lookup function with multiple criteria

    If you're making it an array formula, leave off the initial {} brackets and then do ctrl+shift+enter

  9. #9
    Forum Contributor
    Join Date
    02-14-2013
    Location
    Biloxi, Ms
    MS-Off Ver
    2013 or 2016
    Posts
    115

    Re: Lookup function with multiple criteria

    Quote Originally Posted by Craig K. View Post
    If you're making it an array formula, leave off the initial {} brackets and then do ctrl+shift+enter
    It still seems to be ignoring the IF segment and returning those results anyway. I'm going to try to break this down this evening and see what it's giving me now. I may just have to go at it from the opposite direction and have it look for the desired returns (APPROVED, REJECTED & IN WORK)

+ 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. Replies: 1
    Last Post: 09-04-2014, 12:14 PM
  2. [SOLVED] Lookup Function with Multiple Criteria Including Values Between Two Dates
    By webfeet2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-14-2014, 12:01 PM
  3. Lookup or match function with multiple criteria giving different results
    By Mian USman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-24-2013, 09:15 AM
  4. In need of a lookup function that meets multiple criteria
    By shepherdc2814 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-16-2013, 07:16 PM
  5. Multiple criteria lookup function
    By daniel_ev in forum Excel General
    Replies: 2
    Last Post: 07-02-2012, 08:05 AM
  6. Replies: 1
    Last Post: 05-16-2011, 05:00 PM
  7. use IF/Lookup function in multiple criteria
    By harboens in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2009, 03:50 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