Return the Lessor or Greater Value of Cells

Brabed

Board Regular
Joined
Oct 27, 2005
Messages
54
I am trying to find a way to return the lessor value of two cells. I also want the inverse, to be able to return the greater of two cells. I know the answer is probably easy, but it escapes me right now.


Thanks in advance.
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
This should suffice:

Code:
=IF(A1<B1,A1,B1)
and for the inverse

Code:
=IF(A1>B1,A1,B1)
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
Brabed said:
I am trying to find a way to return the lessor value of two cells. I also want the inverse, to be able to return the greater of two cells. I know the answer is probably easy, but it escapes me right now.


Thanks in advance.

=MAX(A2:B2)

=MIN(A2:B2)

If the target cells are not next to each other:

=MAX(A2,F2)

=MIN(A2,F2)
 

Watch MrExcel Video

Forum statistics

Threads
1,119,002
Messages
5,575,497
Members
412,670
Latest member
Khin Zaw Htwe
Top