Find max value/max duplicate and then vlookup.

alan2231

New Member
Joined
Dec 7, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have an excel document which consists of two array.

Left Array consists of 4 rows which have values from 5-1 (5 beings the highest and 1 being the lowest). The values A,B,C,D,E,F are simplify reference points. W

Right Array consists of the cells that corresponds to the cell from the Left array. For example the left array (A,5) corresponds to A5 in the right array. (D,3) corresponds to D3 and so forth.


ABCDEFABCDEF
555444
5​
A5B5C5D5E5F5
551111
4​
A4B4C4D4E4F4
433332
3​
A3B3C3D3D3F3
211111
2​
A2B2C2D2D2F2
1​
A1B1C1D1D1F1


What I would to know is how to I read each rows from the left array and find the maximum possible value (if duplicates exists take all of them) and then vlook up their corresponding cell in the right array.

So for example
ROW (5,5,5,4,4,4) the max values are 5,5,5 which correspond to A,B and C and the expected result is A5,B5,C5.
ROW (5,5,1,1,1,1) the max values are 5,5, which correspond to A and B and the expected result is A5,B5.
ROW (4,3,3,3,3,2) the max value is 4 which correspond to A and the expected result is 4A

Thank you and I hope I was clear.
 
Last edited by a moderator:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I have attached an image for the code above.
 

Attachments

  • 1.JPG
    1.JPG
    30.2 KB · Views: 24
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top