# range co-dependent minimums

#### tizdall

##### New Member
Let's say I have the following:

 Min B Min P Column A Column B Type Value B 170 P 150 P 151 B 181 B 100 P 101

<tbody>
</tbody>

Is it possible to attribute the minimum value of the "B's" within my data range to the Min B cell and vice versa for the P value? Essentially find the minimum of each type (B or P) depending on what the cell adjacent to it is specifying? It would only be 2 types in the adjacent cells, B or P but mixed and matched within the data range as shown in the table and in no particular order. I want to report back in those 2 cells above the respective minimums for each.

Here's what I have, for finding the minimum of the values on the right, not too sure how to associate the adjacent values. FYI the reason it is set up is that I am not sure how many values I will have in a given file as it is user dependent.

=MIN(B5:OFFSET(B5|COUNT(B5:B1001)-1|0))

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Min B:

=MIN(IF(A5:A1001="B",B5:B1001))

entered with Ctrl+Shift+Enter.

Similar for P.

edit: sorry, just realized my proposal would not work .. sorry about that

Last edited:
Thanks Firefly, works great!

Danzon, appreciate the effort regardless!

You're welcome

Replies
4
Views
233
Replies
1
Views
295
Replies
14
Views
410
Replies
5
Views
254
Replies
6
Views
280

1,203,187
Messages
6,053,995
Members
444,696
Latest member
VASUCH

### 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.

### Which adblocker are you using?

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

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