Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have column A with some numbers and column B, where some cells are empty and some cells contains '+'. And I want to sum cells from Column A, but only cells in rows where B column contains '+'.

For example:

A    B
1    +
2    
3    +
4    

So I want to sum 1 and 3 and get 4.

Can anybody help me?

share|improve this question

migrated from stackoverflow.com Nov 19 '12 at 15:47

This question came from our site for professional and enthusiast programmers.

    
Define "summarize" please. –  Marc Nov 13 '12 at 21:58
    
Get sum. 1 + 3. –  Igor Ryzhov Nov 13 '12 at 21:59
add comment

2 Answers

up vote 1 down vote accepted

SUMIF should do it, as in:

=sumif(B1:B4,"+",A1:A4)

share|improve this answer
    
Thank you, it works! –  Igor Ryzhov Nov 13 '12 at 22:02
add comment

Here ya go:

=SUMIF(B1:B4,"+",A1:A4)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.