ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SUM and IF functions (https://www.excelbanter.com/excel-discussion-misc-queries/145287-sum-if-functions.html)

David

SUM and IF functions
 
I want to use the numeric value returned in a cell by the following function
as part of a horizontal SUM function:
=IF(C2<2,"50",IF(C2=2,"25",IF(C23,"0")))
As is, the SUM ignores the value returned by this function.
How do I get the SUM to recognize the numeric value?
Thanks

Bob I

SUM and IF functions
 
lose the quote marks, SUM doesn't like text.

David wrote:

I want to use the numeric value returned in a cell by the following function
as part of a horizontal SUM function:
=IF(C2<2,"50",IF(C2=2,"25",IF(C23,"0")))
As is, the SUM ignores the value returned by this function.
How do I get the SUM to recognize the numeric value?
Thanks



Bob Phillips

SUM and IF functions
 
Also you don't need the last IF

=IF(C2<2,50,IF(C2=2,25,0))


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Bob I" wrote in message
...
lose the quote marks, SUM doesn't like text.

David wrote:

I want to use the numeric value returned in a cell by the following
function as part of a horizontal SUM function:
=IF(C2<2,"50",IF(C2=2,"25",IF(C23,"0")))
As is, the SUM ignores the value returned by this function.
How do I get the SUM to recognize the numeric value?
Thanks






All times are GMT +1. The time now is 10:24 PM.

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