ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF greater than...IF less than....====== (https://www.excelbanter.com/excel-discussion-misc-queries/28313-if-greater-than-if-less-than-%3D%3D%3D%3D%3D%3D.html)

BenJAMMIN

IF greater than...IF less than....======
 
I am trying to figure out a simple formula but it is giving me fits:

If cell C3 is bigger than D3, Then take D3 and less the amount in F3 and
give me the sum
If cell D3 is bigger than C3, Then take C3 and less the amount in F3 and
give me the sum

So the formula needs to be a sum if statement???
What would it look like?


Biff

Hi!

Try this:

=IF(OR(C3="",D3="",F3=""),"",IF(C3D3,D3-F3,IF(D3C3,C3-F3,"equal")))

You haven't accounted for C3 and D3 being equal!

If any of the referenced cells are empty the formula will return blank ("").

Biff

"BenJAMMIN" wrote in message
...
I am trying to figure out a simple formula but it is giving me fits:

If cell C3 is bigger than D3, Then take D3 and less the amount in F3 and
give me the sum
If cell D3 is bigger than C3, Then take C3 and less the amount in F3 and
give me the sum

So the formula needs to be a sum if statement???
What would it look like?




JE McGimpsey

One way:

=IF(COUNT(C3,D3,F3)=3,MIN(C3,D3)-F3,"")

In article ,
BenJAMMIN wrote:

I am trying to figure out a simple formula but it is giving me fits:

If cell C3 is bigger than D3, Then take D3 and less the amount in F3 and
give me the sum
If cell D3 is bigger than C3, Then take C3 and less the amount in F3 and
give me the sum

So the formula needs to be a sum if statement???
What would it look like?


Ragdyer

How about:

=MIN(C3,D3)-F3
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"BenJAMMIN" wrote in message
...
I am trying to figure out a simple formula but it is giving me fits:

If cell C3 is bigger than D3, Then take D3 and less the amount in F3 and
give me the sum
If cell D3 is bigger than C3, Then take C3 and less the amount in F3 and
give me the sum

So the formula needs to be a sum if statement???
What would it look like?




All times are GMT +1. The time now is 04:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com