Forum Discussion

Mike_Vu_Ngo's avatar
Mike_Vu_Ngo
Copper Contributor
Nov 28, 2021
Solved

[Excel 2019 ] What is a more elegant way to solve this problem?

So I have 2 tables like this and want to return the correct value based on the UserID. As you can see there are multiple instances of the same UserID with different cost priority.   I don't h...
  • OliverScheurich's avatar
    Nov 28, 2021

    Mike_Vu_Ngo 

    =INDEX(IDTable,MATCH(F2&SMALL(IF(IDTable[UserID]=F2,IDTable[Cost_Priority]),1),IDTable[UserID]&IDTable[Cost_Priority],0),2)

     

    =VLOOKUP(F2&G7,CHOOSE({1,2},IDTable[UserID]&IDTable[Problem_Description],IDTable[Cost in USD]),2,0)

     

    Maybe you want to apply formulas like these.