Home > Back-end >  Excel formula to allow me to retrieve the codes of the most valuables drinks
Excel formula to allow me to retrieve the codes of the most valuables drinks

Time:11-25

Good night,

I'm trying to think of a simple excel formula to allow me to get the codes of the most valuables drinks.

I don't wanna use PivotTable for this one.

Ex:

enter image description here

I want to retrieve, for MALIBU, the code 8991

For JAMESON, the code 6113 etc

I'm stuck here since I woke up haha

Thanks!

CodePudding user response:

Try below formula for dynamic spill result-

=LET(x,UNIQUE(C2:C12),y,BYROW(x,LAMBDA(r,INDEX(SORT(FILTER(A2:B12,C2:C12=r),2,-1),1,1))),HSTACK(x,y))

enter image description here

  • Related