Basic If

T

Trying To Excel

I am trying to write the if function for the following
If the sum of A1:E1=0 then "-" if not then sum of A1:E1
 
R

Ron Coderre

Here's the formula you asked for:

=IF(SUM(A1:E1)=0,"-",SUM(A1:E1))

But, try this first....
Format>Cells>Number Tab
Category: Accounting

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro
 
P

Peo Sjoblom

Another approach would be

=SUM(A1:E1)

and custom format General;-General;"-"

--
Regards,

Peo Sjoblom

(No private emails please)
 
T

Trying To Excel

Thanks Ron, It worked just fine

Ron Coderre said:
Here's the formula you asked for:

=IF(SUM(A1:E1)=0,"-",SUM(A1:E1))

But, try this first....
Format>Cells>Number Tab
Category: Accounting

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro
 
T

Trying To Excel

Thanks

Peo Sjoblom said:
Another approach would be

=SUM(A1:E1)

and custom format General;-General;"-"

--
Regards,

Peo Sjoblom

(No private emails please)
 
Top