View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Excell formula help

No I'm wrong again! BJ94 or BJ96 could be negative.

So assuming that the test is correctly written to subtract from BJ96+BJ95
only use:

=IF(SUM(BJ94:BJ96)<BJ95,BJ95,BJ96+BJ95-MAX(BF109-BF113,0))

To subtract from BJ95 only use:

=IF(SUM(BJ94:BJ96)<BJ95-MAX(BF109-BF113,0),BJ95,BJ96+BJ95)

To subtract from either use my previous formula.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Sandy Mann" wrote in message
...
That will of course subtract from either BJ95 or BJ95+BJ96 when ever
BF113<BF109 is true which may not be what you want.

Actually now that I take the time to read your formula:

SUM(BJ94:BJ96) must always be equal to or bigger than BJ95 because BJ95 is
contained withing the SUM() so the test must always be False!

Did you mean SUM(BJ94,BJ96) which is BJ94 + BJ96?

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Sandy Mann" wrote in message
...
Or with fewer key stroks but with one more function call:

=IF(SUM(BJ94:BJ96)<BJ95,BJ95,BJ96+BJ95)-MAX(BF109-BF113,0)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Sandy Mann" wrote in message
...
Try:

=IF(SUM(BJ94:BJ96)<BJ95,BJ95,BJ96+BJ95)-(BF109-BF113)*(BF113<BF109)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Brian" wrote in message
...
I have this formula in a cell
(=IF(SUM(BJ94:BJ96)<BJ95,BJ95,BJ96+BJ95+BJ94 ).
this formula does not function correctly in all conditions. In
certain
conditions it needs to run like this
(=IF(SUM(BJ94:BJ96)<BJ95,BJ95,BJ96+BJ95). and in another condition it
need
to be this (=IF(SUM(BJ94:BJ96)<BJ95,BJ95,BJ96+BJ95)-(bf109-bf113)

What I need to do is set a condition something like this
=if(Bf113<bf109)
choose a say this formula
(=IF(SUM(BJ94:BJ96)<BJ95,BJ95,BJ96+BJ95)-(bf109-bf113)

So the final question I have is! Is it possible to set say three
conditions
and have a formula and it choose a separate formula per each condition.
in a
single cell.