+ Reply to Thread
Results 1 to 6 of 6

Find a result based on three criteria

  1. #1
    Registered User
    Join Date
    11-22-2019
    Location
    Scottish Borders, UK
    MS-Off Ver
    MS 2010
    Posts
    4

    Find a result based on three criteria

    Hi Guys,

    I'm a forester involved in processing data collected in the forest.

    I have a dataset of 4 fields and 12000 rows.

    I need to find the value in the 4th field - it is based on the combination of the first three fields. I thought it would be simple (it is in MS Access) but it's not in Excel.

    Any help would be gratefully received. I've created about 40 rows from it in the attached example.

    Cheers

    Mark
    Attached Files Attached Files
    Last edited by marketal; 11-22-2019 at 11:38 AM.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Find a result based on three criteria

    given version, XL2010, you might try:

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

    above would return 6, 4, 6 & 8

  3. #3
    Registered User
    Join Date
    11-22-2019
    Location
    Scottish Borders, UK
    MS-Off Ver
    MS 2010
    Posts
    4

    Re: Find a result based on three criteria

    Quote Originally Posted by XLent View Post
    given version, XL2010, you might try:

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

    above would return 6, 4, 6 & 8
    Brilliant! I'm familiar with LOOKUP, but everything I read suggested a combination of MATCH and INDEX, which I couldn't get to work - principally because I couldn't understand it!

    Thank you very much indeed!

  4. #4
    Registered User
    Join Date
    11-22-2019
    Location
    Scottish Borders, UK
    MS-Off Ver
    MS 2010
    Posts
    4

    Re: Find a result based on three criteria

    XLent,

    This is really good, and it seems to be working perfectly in my spreadsheet, but I don't understand it. It seems to performing a calculation; what is it looking up in the =LOOKUP(2,1/…?

    Can you quickly describe what it's doing, so if I come across a similar problem in the future, I can resolve it myself.

    Cheers

    Mark

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Find a result based on three criteria

    Hi Mark,

    In a nutshell... 3 key principles to consider with LOOKUP(lookup_value, lookup_vector [,result_vector])

    1. LOOKUP assumes all values in the lookup_vector are in ascending order (irrespective of reality)
    2. LOOKUP will ignore values in the lookup_vector that are not of the same data type as the lookup_value and, crucially, this also includes error types
    3. LOOKUP retrieves the last value <= lookup_value from lookup_vector or, where specified, the associated value from the otherwise optional result_vector

    So, in this case the lookup_vector can only be comprised of either 1s or #DIV/0!

    lookup_vector value will be 1 where all Boolean test satisfied - i.e. 1/(TRUE*TRUE*TRUE) --> 1/1 --> 1
    lookup_vector value will be #DIV/0! if one or more of the Boolean tests are not satisfied - e.g. 1/(TRUE*FALSE*TRUE) --> 1/0 --> #DIV/0!

    We set lookup_value to be 2 as we know this will be bigger than any possible value within the lookup_vector (1 would be the max)

    Then, in line with the 3 key principles of the LOOKUP function, we know LOOKUP will return the value from the result_vector that is associated with the last instance of 1 in the lookup vector

  6. #6
    Registered User
    Join Date
    11-22-2019
    Location
    Scottish Borders, UK
    MS-Off Ver
    MS 2010
    Posts
    4

    Re: Find a result based on three criteria

    Xlent,

    Thanks very much. I guess I meant I was au fait with VLOOKUP and HLOOKUP. This is a somewhat different ballgame.

    Thanks for taking the time to explain it so simply - I appreciate it very much!

    Cheers

    Mark

+ 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: 3
    Last Post: 06-03-2019, 11:26 AM
  2. Return a Result Based on 2 Criteria
    By uberathlete in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-26-2016, 07:13 AM
  3. Replies: 3
    Last Post: 02-09-2016, 05:08 AM
  4. Result based on criteria in Userform
    By blake22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-25-2015, 03:48 AM
  5. [SOLVED] Index formula looking at two criteria to find result
    By ciresuark in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-18-2015, 03:18 PM
  6. excel formula to find the result from the 3 column with criteria
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-26-2013, 05:09 AM
  7. Find/Replace based on CF result
    By pdd1055 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2005, 06:06 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