Sum # in column only if cell contain text [Solved/Closed]

Report
Posts
5
Registration date
Tuesday September 11, 2012
Status
Member
Last seen
September 18, 2012
-
Posts
5
Registration date
Tuesday September 11, 2012
Status
Member
Last seen
September 18, 2012
-
Hello,

e.g. I am trying to sum up the row of number when a cell in the same row contains text "Ball"

[Column A]
Red Ball
Blue Ball
Chair
Pencil
Blue Ball

[Column B]
2
3
4
1
2

The resulting formula should output "7".

So far I have gotten "=IF(ISNUMBER(SEARCH("Ball",A1)),TRUE,FALSE). But I don't know how to sum up those specific rows without having to create another formula in another cell. Ideally I would want one cell, one formula.

Sincerely,
xHaxelx


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
=SUMIF(A:A,"*Ball",B:B)
2
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Posts
5
Registration date
Tuesday September 11, 2012
Status
Member
Last seen
September 18, 2012

Thank you!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!