Select range based on cell content

tizdall

New Member
Joined
Apr 10, 2013
Messages
17
Hello!

I am trying to find a CSE formula (not sure if I need to do this in VBA?) where I can select a range of data in a column based on fixed first cell in the column but the last point is dynamic depending on the user input.

For example:

Column AColumn B
R1
R2
R3
R410
R53
R60
R75
R88
R928
R10
R11
R12
R13

<tbody>
</tbody>



So I know that my first point will be R4 Column B but in each case the end point might be R10 in one case, R100 in another. The end result is that I want to report the minimum value in this range but I'm not sure how to specify this open ended range as a CSE formula..?

so far what I have is:

{=If(Min(B4:B9<>0|B4:B9))}

I am trying to figure out a replacement for the "B9" so that it locates the last cell from B4 that has data and then find the (non-zero) minimum in that range.


Any help would be appreciated!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi,

Try,

=MIN(B4:OFFSET(B4,COUNT(B4:B1000)-1,0))

Array formula. To be confirmed with CTRL + SHIFT + ENTER.

Jai
 
Upvote 0
Got an additional question:

Let's say I have the following:

Min B
Min P
TypeValue
B170
P150
P151
B181
B100
P101

<tbody>
</tbody>

I am using the first part as my minimum finder within the range, 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.

Again, thanks for the help before, any additional help would be appreciated!!
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,689
Members
449,117
Latest member
Aaagu

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