SUM condition on one set of columns where another includes certain values

Posted by pjp on Super User See other posts from Super User or by pjp
Published on 2009-10-29T15:01:30Z Indexed on 2012/10/01 21:41 UTC
Read the original article Hit count: 152

I have the following data in Excel where I want a formula that will give me the sum of all of the total rows:

A                             B
australia                    10
australia total              10
china                         1
china                         5
china                         7
china total                  13

I have tried formulae along the lines of

=sumif(A:A,"search("total",A:A)>0",B:B)

but I cannot get the condition to work.

What is the correct way to write this contains condition?

Is there also specific a grammar for the condition language? I've been unable to find anything.

© Super User or respective owner

Related posts about microsoft-excel

Related posts about worksheet-function