Multiple-column based lookups in Excel

前端 未结 3 509
不思量自难忘°
不思量自难忘° 2021-01-16 07:02
        A     B    C
    1 PROD1 TYPE1 VAL1
    2 PROD2 TYPE1 VAL2
    3 PROD1 TYPE2 VAL3
    4 PROD2 TYPE3 VAL2 

In an empty cell I want to get th

3条回答
  •  不知归路
    2021-01-16 07:29

    Have a look at using the DGET Excel function.

    Set

    • A1 = ProdType
    • B1 = Type
    • C1 = Val

    Then your provided data in A2:C5

    Then

    • H1 = ProdType
    • I1 = Type
    • H2 = =PROD2 (Criteria 1)
    • I2 = =TYPE3 (Criteria 2)

    And lastly, in H3:

    =DGET(A1:C5,"Val",H1:I2)
    

    That should get the value for you.

提交回复
热议问题