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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,226,114
Messages
6,189,052
Members
453,522
Latest member
Seeker2025

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