Donate SIGN UP

Excel formula

Avatar Image
c00ky83 | 16:30 Sun 06th Aug 2006 | Technology
3 Answers
I need a formula for the following calculation:

A _ B
2 _ 0
7 _ 1
4 _ 0
8 _ 1
4 _ 1
_ _ X

Column A will contain many more numbers, much larger. Column B will be 0 for all but 4 values of A, and I need to sum these 4 values of A. So, here X will be 7+8+4=19.

I tried sum((a1*b1):(a5*b5)) to no avail, but hopefully you'll see where I'm coming from!
Gravatar

Answers

1 to 3 of 3rss feed

Best Answer

No best answer has yet been selected by c00ky83. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Presuming your data cells start at row 2, then

=SUMIF(B2:B6,"=1",A2:A6)

should do what you want.
Question Author
Many thanks: however, I worded my title rather badly. Where I put "Excel" I actually meant "MSWorks". There's my problem!
Sorry, I'm not familiar with MSWorks, and don't have a copy to try it on.

I believe that the SUMIF formula works in the free Open Office Suite, if that's any help.

http://www.openoffice.org/

1 to 3 of 3rss feed

Do you know the answer?

Excel formula

Answer Question >>