How to pull a value based on two conditions from table

dane linhoff 20 Reputation points
2024-04-29T21:31:25.32+00:00

How do I create a formula where two data points in Sheet1 are compared to a table in Sheet2 to output the intersecting data.

SHEET 1 Output

SHEET 2 Info

Thank you very much for any help :)

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,348 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,527 questions
0 comments No comments
{count} votes

Accepted answer
  1. Barry Schwarz 2,191 Reputation points
    2024-04-29T22:39:15.2333333+00:00

    You use the MATCH function to determine which relative row in sheet2!A2:A4 corresponds to the name in column A of sheet1. Then you use the MATCH again to determine which relative column in sheet2!B1:D1 corresponds to the dessert in column B of sheet 1. Finally you use these two values with the INDEX function to pull the value from sheet2.

    For your sample date, the end result in C3 looks like

    =INDEX(sheet2!B$2:D$4,MATCH(A3,sheet2!A$2:A$4,0),MATCH(B3,B$1:D$1,0))
    

    and this can be copied to each row in column C

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful