Excel table lookup matching values of two columns

Jeff Axelrod

I'd like to create a table lookup formula that matches two columns. For instance, suppose I'd like to find the value of the Letter column at the row where the Type column is Biennial and the Result column is Warning.

  A               B            C
1 Letter          Type         Result
2 A               Annual       Exceeds
3 B               Biennial     Warning
4 C               Biennial     DevelopmentNeeded
5 D               Biennial     PartiallyMeets
6 E               Annual       Meets

What would the formula look like to accomplish this?

oscarius

The SUMPRODUCT() formula is really apt for situations where you want to lookup a value with multiple criteria. It is most convenient when wanting to look up numeric values, but it can be adjusted to look up string values as well. As a bonus, you can avoid having to use array formulas.

This particular problem can be tackled with the following formula (indentation added for legibility, which you can do in Excel formulas using ALT + ENTER):

=INDEX(
       $A$2:$A$6,
       SUMPRODUCT(
                  ($B$2:$B$6 = "Biennial") *
                  ($C$2:$C$6 = "Warning") *
                  ROW($A$2:$A$6)
                 ) - 1
       )

First, SUMPRODUCT() is used to filter out the proper rows using ($B$2:$B$6 = "Biennial") and ($C$2:$C$6 = "Warning"); the multiplication operator * functions as an AND operator (the + operator would function as an OR operator).

Then the result is multiplied by ROW($A$2:$A$6) to find the particular row that has the combination. SUMPRODUCT() then adds everything up, which in this case gives us 3. As the result sought is actually on row 2 due to the column headings, we subtract 1. By applying the INDEX() function, we get the desired result: B.

Beware though that this is the case if and only if the combination sought is unique. If the combination sought exists more than once, this will break down.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Find specific matching values of two columns in excel

From Dev

Lookup Two Columns Against Two Columns in Excel

From Dev

Excel - compare two columns, if match subtract values of other two columns from matching rows

From Dev

BIDS 2008 - Lookup value in source against two columns in lookup table

From Dev

Excel comparing two columns, complicated matching

From Dev

Filtering the dataframe by matching values of two columns

From Dev

matching columns with nearly similar values in Excel

From Dev

Excel: Lookup matching cell in a table and return the value of the first cell in the row

From Dev

Extract values in two different columns matching in other columns in R

From Dev

Extract values in two different columns matching in other columns in R

From Dev

MS EXCEL - Lookup/Check for multiple columns values in other sheet

From Dev

Change values in multiple columns of a dataframe using a lookup table

From Dev

Excel with lookup in multiple columns

From Dev

data.table in R: Replace a column value with a value from same column after matching two other columns values

From Dev

SQL Count. How can I count how many distinct values are in a table when an other two columns are matching?

From Dev

Excel Compare Values in two columns in a single row

From Dev

Excel Lookup Table and Match Values Based on Row Difference

From Dev

Excel Table lookup on Column/Row and rounding values up

From Dev

Calculating ratio of two columns in Excel pivot table

From Dev

Matching two values in a table to another value in a table sql

From Dev

Matching two values in a table to another value in a table sql

From Dev

Getting Summation from a Table, with matching values from another Table in Excel

From Dev

Merging two columns with values from another table

From Dev

Lookup multiple values in excel

From Dev

Merge two Excel tables Based on matching data in Columns

From Dev

Excel: Is there a way to match Two Columns while matching a third

From Dev

Excel comparison of two columns and print value of other column for the matching entries

From Dev

SELECT DISTINCT + matching values from two columns = "unique"

From Dev

Filter a data frame based on matching values (exact) between two columns

Related Related

  1. 1

    Find specific matching values of two columns in excel

  2. 2

    Lookup Two Columns Against Two Columns in Excel

  3. 3

    Excel - compare two columns, if match subtract values of other two columns from matching rows

  4. 4

    BIDS 2008 - Lookup value in source against two columns in lookup table

  5. 5

    Excel comparing two columns, complicated matching

  6. 6

    Filtering the dataframe by matching values of two columns

  7. 7

    matching columns with nearly similar values in Excel

  8. 8

    Excel: Lookup matching cell in a table and return the value of the first cell in the row

  9. 9

    Extract values in two different columns matching in other columns in R

  10. 10

    Extract values in two different columns matching in other columns in R

  11. 11

    MS EXCEL - Lookup/Check for multiple columns values in other sheet

  12. 12

    Change values in multiple columns of a dataframe using a lookup table

  13. 13

    Excel with lookup in multiple columns

  14. 14

    data.table in R: Replace a column value with a value from same column after matching two other columns values

  15. 15

    SQL Count. How can I count how many distinct values are in a table when an other two columns are matching?

  16. 16

    Excel Compare Values in two columns in a single row

  17. 17

    Excel Lookup Table and Match Values Based on Row Difference

  18. 18

    Excel Table lookup on Column/Row and rounding values up

  19. 19

    Calculating ratio of two columns in Excel pivot table

  20. 20

    Matching two values in a table to another value in a table sql

  21. 21

    Matching two values in a table to another value in a table sql

  22. 22

    Getting Summation from a Table, with matching values from another Table in Excel

  23. 23

    Merging two columns with values from another table

  24. 24

    Lookup multiple values in excel

  25. 25

    Merge two Excel tables Based on matching data in Columns

  26. 26

    Excel: Is there a way to match Two Columns while matching a third

  27. 27

    Excel comparison of two columns and print value of other column for the matching entries

  28. 28

    SELECT DISTINCT + matching values from two columns = "unique"

  29. 29

    Filter a data frame based on matching values (exact) between two columns

HotTag

Archive