Remember Me?

#### Menu

#1
May 17th 05, 03:34 PM
 Natalie Posts: n/a
IF and SUM

How do I say

If the sum of A1:E1 is greater than 1, enter a 1 in the column, but if not
then enter a 0?

#2
May 17th 05, 03:39 PM
 JE McGimpsey Posts: n/a

One way:

=IF(SUM(A1:E1)1,1,0)

or, more compactly (using the fact that XL coerces TRUE/FALSE to 1/0 in
math operations):

=--(SUM(A1:E1)1)

where the first - coerces TRUE/FALSE to -1/0, and the second back to 1/0.

In article ,
"Natalie" wrote:

How do I say

If the sum of A1:E1 is greater than 1, enter a 1 in the column, but if not
then enter a 0?

#3
May 17th 05, 03:48 PM
 Natalie Posts: n/a

Thanks

What if I wanted to count the number of SS or LS in these cells?

"JE McGimpsey" wrote:

One way:

=IF(SUM(A1:E1)1,1,0)

or, more compactly (using the fact that XL coerces TRUE/FALSE to 1/0 in
math operations):

=--(SUM(A1:E1)1)

where the first - coerces TRUE/FALSE to -1/0, and the second back to 1/0.

In article ,
"Natalie" wrote:

How do I say

If the sum of A1:E1 is greater than 1, enter a 1 in the column, but if not
then enter a 0?

#4
May 17th 05, 04:36 PM
 JE McGimpsey Posts: n/a

One way:

=COUNTIF(A1:E1,"SS")

In article ,
"Natalie" wrote:

What if I wanted to count the number of SS or LS in these cells?

#5
May 18th 05, 08:53 AM
 Natalie Posts: n/a

Sorry, I still can't make it work -

I want to add all the SS and LS together, and if they are more than one,
have a 1 appear, and if the answer is 0 then a 0 appear?

Thanks for all your help

"JE McGimpsey" wrote:

One way:

=COUNTIF(A1:E1,"SS")

In article ,
"Natalie" wrote:

What if I wanted to count the number of SS or LS in these cells?

#6
May 18th 05, 01:23 PM
 JE McGimpsey Posts: n/a

One way:

=IF(SUM(COUNTIF(A1:E1,{"SS","LS"})) 0, 1, 0)

or more compactly:

=--(SUM(COUNTIF(A1:E1,{"SS","LS"})) 0)

In article ,
"Natalie" wrote:

Sorry, I still can't make it work -

I want to add all the SS and LS together, and if they are more than one,
have a 1 appear, and if the answer is 0 then a 0 appear?

Thanks for all your help

"JE McGimpsey" wrote:

One way:

=COUNTIF(A1:E1,"SS")

In article ,
"Natalie" wrote:

What if I wanted to count the number of SS or LS in these cells?

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

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

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright ©2004-2020 ExcelBanter.
The comments are property of their posters.

# About Us

"It's about Microsoft Excel"

Copyright © 2017