Return max index value in vlookup

前端 未结 3 1411
忘了有多久
忘了有多久 2020-12-20 01:57

I\'m trying to pair a vlookup with a max function. For some reason it only returns #ref every time I try to use it though.

My sheet looks like this:



        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-20 02:26

    If there's only one instance of each Product then you can use INDEX/MATCH like this

    =MAX(INDEX(C2:G100,MATCH("Prod 1",A2:A100,0),0))

    Longer than Sid's suggestion but doesn't need CSE and might be more efficient if you only have a single match

    If you have that formula in Z2, for example, you can use this version to get the location from row 1

    =INDEX(C1:G1,MATCH(Z2,INDEX(C2:G100,MATCH("Prod 1",A2:A100,0),0),0))

提交回复
热议问题