Find Minimum Value in an Array depending on string in adjacent cell

music_al

Board Regular
Joined
Nov 26, 2008
Messages
133
Hi

I need to find the minimum value in an array depending on a certain string being present (even in part) in the adjacent cell. So, in the example below, I'd like to return the MINIMUM value from cells B2:B6 only if any cell in column A contains a "2". In this example rows 2 and rows 6 are valid as they contain a 2.

This example should return 10,000.

AB
1GradePay
21,210,000
3211,000
4212,000
5213,000
62,314,000

<tbody>
</tbody>

I need to do the same for the maximum value.

Thank you in advance.

Al
 
Last edited:

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Control+shift+enter, not just enter:

=MIN(IF(ISNUMBER(FIND(","&D2&",",","&$A$2:$A$6&",")),$B$2:$B$6))

=MAX(IF(ISNUMBER(FIND(","&D2&",",","&$A$2:$A$6&",")),$B$2:$B$6))

where D2 = 2.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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