I would like to write the formula (in OpenOffice, but I imagine it won't be any different than Excel) to perform the following calculation:

-> Go through the values in column B from B1 to B30 and add them together.
-> Only include the individual number Bn in the sum if An == "value".

So, I want to create a sum of column B but only include the numbers in the sum if their corresponding A column value is some "value".

  • Did you try anything or get stuck some where? Did you look at a VLOOKUP or IF statements? – Dave Sep 9 '13 at 13:26

Sounds like you could use SUMIF, e.g.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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