How to have Range condition in VLOOKUP?

前端 未结 2 1276
你的背包
你的背包 2021-01-29 11:11

I have the below table in Excle file and i want to find the value column for the respective input.

Col A   Col B   Col C   Min  Max    Value
101      AA      Hig         


        
相关标签:
2条回答
  • 2021-01-29 12:01

    If you use this version it can return text or number - if there's no match you get #N/A

    =LOOKUP(2,1/(A2:A9=101)/(B2:B9="AA")/(C2:C9="Low")/(D2:D9=11),F2:F9)

    If there is more than one matching row that returns the last - for the first try this version:

    =INDEX(F2:F9,MATCH(1,INDEX((A2:A9=101)*(B2:B9="AA")*(C2:C9="Low")*(D2:D9=11),0),0))

    0 讨论(0)
  • 2021-01-29 12:10

    If there is no duplicate rows, you can use following formulas:

    for Excel 2007 or later:

    =SUMIFS(F2:F9,A2:A9,101,B2:B9,"AA",C2:C9,"Low",D2:D9,"<="&12,E2:E9,">="&12)
    

    for Excel 2003:

    =SUMPRODUCT((F2:F9)*(A2:A9=101)*(B2:B9="AA")*(C2:C9="Low")*(D2:D9<=12)*(E2:E9>=12))
    

    where 101, "AA", "Low" and 12 could be changed to cell references (e.g. G1,G2 and so on)

    enter image description here

    0 讨论(0)
提交回复
热议问题