Max Value Based On Custom List

Nanogirl21

Active Member
Joined
Nov 19, 2013
Messages
330
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am looking for a formula that will be able to populate a cell with the max value in a range based on a custom list.

Example.

CUSTOM LIST (Smallest to Largest) = ORANGE 00, APPLE 05, BANANA / HOLD, PINEAPPLE
(If I have to have the list somewhere in my workbook it will be on a sheet called Holidays in Cell E2-E15 sorted from smallest to largest. All other info is on Sheet 1)


The range is W:Z and I am looking for the max value to populate in AA

W
XYZ
AA
BANANA / HOLDPINEAPPLEORANGE 00
APPLE 05PINEAPPLE
APPLE 05ORANGE 00BANANA / HOLDBANANA / HOLDBANANA / HOLD

<tbody>
</tbody>


Thank you for the help.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If your first row is 2, try:

=INDEX(W2:Z2,MATCH(MAX(MATCH(W2:Z2,Holidays!$E$2:$E$15,0)),MATCH(W2:Z2,Holidays!$E$2:$E$15,0),0))
confirmed with Control+Shift+Enter.

If you might have spaces or values that aren't in your list, then maybe:

=INDEX(W2:Z2,MATCH(AGGREGATE(14,6,MATCH(W2:Z2,Holidays!$E$2:$E$15,0),1),MATCH(W2:Z2,Holidays!$E$2:$E$15,0),0))
with CSE.
 
Upvote 0
If your first row is 2, try:

=INDEX(W2:Z2,MATCH(MAX(MATCH(W2:Z2,Holidays!$E$2:$E$15,0)),MATCH(W2:Z2,Holidays!$E$2:$E$15,0),0))
confirmed with Control+Shift+Enter.

If you might have spaces or values that aren't in your list, then maybe:

=INDEX(W2:Z2,MATCH(AGGREGATE(14,6,MATCH(W2:Z2,Holidays!$E$2:$E$15,0),1),MATCH(W2:Z2,Holidays!$E$2:$E$15,0),0))
with CSE.

Thank you. I tried both and I am getting a #Value ! error.
 
Upvote 0
That would happen if you entered either formula without Control+Shift+Enter. If you have one of the formulas entered, select the cell it's in. Press F2 to edit the formula, then hold down the Control and Shift keys, then press Enter, and release all the keys.

To start from scratch, delete whatever's in AA2. Select it, paste the formula into the formula bar, and instead of just pressing Enter, hold down the Control and Shift keys, then press enter. If you did it right, Excel will put {} around the formula. You can't just put the {} yourself though, you must do the whole CSE procedure.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,017
Members
448,937
Latest member
BeerMan23

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