Conditional Min/Max Question?

M

Mike

Hi everyone,

Say I have this:

A B
1 3
1 4
1 5
1 6
2 1
2 2
2 3
2 4

While A=1, what is the MIN in B (answer=3)
While A=1, what is the MAX in B (answer=6)
While A=2, what is the MIN in B (answer=1)
While A=2, what is the MAX in B (answer=4)

Any excel formula to do this?

Thanks,
Mike
 
R

Ron Rosenfeld

Hi everyone,

Say I have this:

A B
1 3
1 4
1 5
1 6
2 1
2 2
2 3
2 4

While A=1, what is the MIN in B (answer=3)
While A=1, what is the MAX in B (answer=6)
While A=2, what is the MIN in B (answer=1)
While A=2, what is the MAX in B (answer=4)

Any excel formula to do this?

Thanks,
Mike


With E1 containing either a 1 or a 2:

These formulas must be **array-entered**:

=MAX(IF(A1:A8=E1,B1:B8))
=MIN(IF(A1:A8=E1,B1:B8))

----------------------------------------

To **array-enter** a formula, after entering
the formula into the cell or formula bar, hold down
<ctrl><shift> while hitting <enter>. If you did this
correctly, Excel will place braces {...} around the formula.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top