# Microsoft Office Application Help - Excel Help forum > Excel General >  >  whichever is greater

## emerald_dragonfly

I am trying to put together a spreadsheet for calulating transpot costs.  I
would like to know if there is a formula to use that will select the greater
of two numbers.  for instance if I had two numbers 3 and 4 and my calulation
needs to use the larger of the two how do I get excel to do that?

----------


## Dan Chupinsky

If I understand your question, assume A1 contains "3", B1 contains "4" and
C1 contains "6"; and in D1 you want the product of C1 and the greater of A1
or B1,
then use the Formula =IF(A1>B1,A1*C1,B1*C1) in D1

Dan
"emerald_dragonfly" <emerald_dragonfly@discussions.microsoft.com> wrote in
message news:2F938653-7F07-4762-BCDA-BE69660DE1D8@microsoft.com...
>I am trying to put together a spreadsheet for calulating transpot costs.  I
> would like to know if there is a formula to use that will select the
> greater
> of two numbers.  for instance if I had two numbers 3 and 4 and my
> calulation
> needs to use the larger of the two how do I get excel to do that?

----------


## emerald_dragonfly

I am sorry I didn't explain that well did I?  In transportation rates are
based on cubic meters (CBM).  Cubic meters can be determined through weight
of the product or measurment.  I have the formulas to determine the CBM by
weight and by measure.  I need the spreadsheet to automatically fill in the
greater of the two numbers.  For Instance if by measure I calculate 3CBM and
by weight 4 CBM than I need the cells of the spreadsheet to automaticcaly
fill with 4 as that is the greater CBM calculation.  Does this make sense?

"Dan Chupinsky" wrote:

> If I understand your question, assume A1 contains "3", B1 contains "4" and
> C1 contains "6"; and in D1 you want the product of C1 and the greater of A1
> or B1,
> then use the Formula =IF(A1>B1,A1*C1,B1*C1) in D1
>
> Dan
> "emerald_dragonfly" <emerald_dragonfly@discussions.microsoft.com> wrote in
> message news:2F938653-7F07-4762-BCDA-BE69660DE1D8@microsoft.com...
> >I am trying to put together a spreadsheet for calulating transpot costs.  I
> > would like to know if there is a formula to use that will select the
> > greater
> > of two numbers.  for instance if I had two numbers 3 and 4 and my
> > calulation
> > needs to use the larger of the two how do I get excel to do that?
>
>
>

----------


## Bill Kuunders

The by measure result is in C1
the by weight result is in D1
in E1 enter =MAX(C1,D1)

--
Greetings from New Zealand
Bill K


"emerald_dragonfly" <emeralddragonfly@discussions.microsoft.com> wrote in
message news:96EB9C6E-CCF7-4C0B-8B3C-D42A6818CBBA@microsoft.com...
>I am sorry I didn't explain that well did I?  In transportation rates are
> based on cubic meters (CBM).  Cubic meters can be determined through
> weight
> of the product or measurment.  I have the formulas to determine the CBM by
> weight and by measure.  I need the spreadsheet to automatically fill in
> the
> greater of the two numbers.  For Instance if by measure I calculate 3CBM
> and
> by weight 4 CBM than I need the cells of the spreadsheet to automaticcaly
> fill with 4 as that is the greater CBM calculation.  Does this make sense?
>
> "Dan Chupinsky" wrote:
>
>> If I understand your question, assume A1 contains "3", B1 contains "4"
>> and
>> C1 contains "6"; and in D1 you want the product of C1 and the greater of
>> A1
>> or B1,
>> then use the Formula =IF(A1>B1,A1*C1,B1*C1) in D1
>>
>> Dan
>> "emerald_dragonfly" <emerald_dragonfly@discussions.microsoft.com> wrote
>> in
>> message news:2F938653-7F07-4762-BCDA-BE69660DE1D8@microsoft.com...
>> >I am trying to put together a spreadsheet for calulating transpot costs.
>> >I
>> > would like to know if there is a formula to use that will select the
>> > greater
>> > of two numbers.  for instance if I had two numbers 3 and 4 and my
>> > calulation
>> > needs to use the larger of the two how do I get excel to do that?
>>
>>
>>

----------


## doucetrr

you can use the Max function to achieve this too, which is easier to implement/maintain than the "If" function. For example, let's say columns E through H have numbers and you want to select the highest number from the four columns. You would use the following formula: =MAX(E2:H2).

----------


## emerald_dragonfly

Thanks folks!  Have a great day!

"doucetrr" wrote:

>
> you can use the Max function to achieve this too, which is easier to
> implement/maintain than the "If" function. For example, let's say
> columns E through H have numbers and you want to select the highest
> number from the four columns. You would use the following formula:
> =MAX(E2:H2).
>
>
> --
> doucetrr
> ------------------------------------------------------------------------
> doucetrr's Profile: http://www.excelforum.com/member.php...o&userid=24872
> View this thread: http://www.excelforum.com/showthread...hreadid=384149
>
>

----------

