I have two tables.
Table 1
Now I want a function to compare Test column and when they are equal (for example row 2 of table matches row 3 and 4 of table 2) I need to compare the price column to check the max (in this example row 3 600 is greater than row 4 550) and then return my chosen column. So this should return "pixel as Value1" and "4 as rank".
I tried VLOOKUP, IF but was not able to merge them to get the desired result. Any help is appreciated.





