ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF statements (https://www.excelbanter.com/excel-discussion-misc-queries/230080-if-statements.html)

Dave in Ampthill[_2_]

IF statements
 
Hi,

I have a column of cells ranging from F46 to F51

I want cell F51 to be the sum of F46:F50 with the following conditions:

If SUM(F46:F50) = 0 then F51 to read 0
If SUM(F46:F50)<200 then F51 to read 200
If SUM(F46:F50)200 then F51 to show actual sum of F46:F50

How do I write this as a formula?

Many thanks in advance,

Dave


macropod[_2_]

IF statements
 
Hi Dave,

Try:
=(SUM(F46:F50)<0)*(SUM(F46:F50)<200)*200+(SUM(F46 :F50)=200)*SUM(F46:F50)

Note: you need to provide for SUM(F46:F50)=200, which I have done. I assume that, if you have -ve values to deal with, you want them
to display '200' also, as there's nothing in your problem description to allow for another outcome. If -ve values require a '0'
result, delete the first '<' from the formula.

--
Cheers
macropod
[Microsoft MVP - Word]


"Dave in Ampthill" wrote in message
...
Hi,

I have a column of cells ranging from F46 to F51

I want cell F51 to be the sum of F46:F50 with the following conditions:

If SUM(F46:F50) = 0 then F51 to read 0
If SUM(F46:F50)<200 then F51 to read 200
If SUM(F46:F50)200 then F51 to show actual sum of F46:F50

How do I write this as a formula?

Many thanks in advance,

Dave



David Biddulph[_2_]

IF statements
 
=IF(SUM(F46:F50)=0,0,MAX(SUM(F46:F50),200))
--
David Biddulph

"Dave in Ampthill" wrote in
message ...
Hi,

I have a column of cells ranging from F46 to F51

I want cell F51 to be the sum of F46:F50 with the following conditions:

If SUM(F46:F50) = 0 then F51 to read 0
If SUM(F46:F50)<200 then F51 to read 200
If SUM(F46:F50)200 then F51 to show actual sum of F46:F50

How do I write this as a formula?

Many thanks in advance,

Dave




Stefi

IF statements
 
One way:
=IF(SUM(F46:F50)=0,0,MAX(200,SUM(F46:F50)))
Regards,
Stefi

€˛Dave in Ampthill€¯ ezt Ć*rta:

Hi,

I have a column of cells ranging from F46 to F51

I want cell F51 to be the sum of F46:F50 with the following conditions:

If SUM(F46:F50) = 0 then F51 to read 0
If SUM(F46:F50)<200 then F51 to read 200
If SUM(F46:F50)200 then F51 to show actual sum of F46:F50

How do I write this as a formula?

Many thanks in advance,

Dave



All times are GMT +1. The time now is 06:14 AM.

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