View Single Post
#5
April 18th 10, 05:43 AM posted to microsoft.public.excel.newusers
 Vinay Vasu external usenet poster First recorded activity by ExcelBanter: Apr 2010 Posts: 10
Attachment :SUM of a colum where IF function is used

Thanks a lot.

It worked well.

Jeevan

"Joe User" <joeu2004 wrote in message
...
"Vinay Vasu" wrote:
I would like to have the sum of cloumn 'C' in the
attached file.

Many people cannot see an attachment because of the news interface that
they use. This includes users of Google Groups and the MS Discussion
Groups web interface.

Your worksheet is simple enough to describe.

An IF function is used to derive column C.
=SUM ( C1:C21) is not giving the result.

In column C, you have formulas of the form:

=IF(B2=A2,"1",IF(B2=0,"0",IF(B2<A2,"-0.25")))

The root cause of your problem is: the IF expression should return
numbers (1, 0, -0.25), not text ("1", "0", "-0.25"). You should write:

=IF(B2=A2,1,IF(B2=0,0,IF(B2<A2,-0.25)))

Note: The formula can be simplified to:

=IF(B2=A2,1,IF(B2=0,0,-0.25))

Also, when A2 is zero, does that give you the intended result: 1, not 0?

I wonder if you really want:

=IF(B2=0,0,IF(B2=A2,1,-0.25))

----- original message -----

"Vinay Vasu" wrote in message
...
Hi,

I would like to have the sum of cloumn 'C' in the attached file.
An IF function is used to derive column C.
=SUM ( C1:C21) is not giving the result.