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.

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Grade[/TD]
[TD]Pay[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1,2[/TD]
[TD]10,000[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]11,000[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2[/TD]
[TD]12,000[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]2[/TD]
[TD]13,000[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]2,3[/TD]
[TD]14,000[/TD]
[/TR]
</tbody>[/TABLE]

I need to do the same for the maximum value.

Thank you in advance.

Al
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
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,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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