How to get certain value based on text?

38 views Asked by At

A product with multiple pricing based on its e-commerce platform. How to I get the correct pricing based on the name of the ecommerce platform? Lets say Product A is $5 on Amazon and $7 on eBay. If there is a sale of Product A on eBay, it will display eBay price and if its a sale on Amazon, it will display amazon price.

I tried using IF and VLOOKUP function but ended up confusing the shit out of myself.

1

There are 1 answers

0
Harun24hr On

You need FILTER() function. Try-

=@FILTER($C$2:$C$3,($A$2:$A$3=F2)*($B$2:$B$3=G2))

Or MAP() function for dynamic spill results.

=MAP(F2:F3,G2:G3,LAMBDA(x,y,TAKE(FILTER(C2:C3,(A2:A3=x)*(B2:B3=y)),1)))

enter image description here