Taking sum according to text value in a different column

I’m building a financial table and trying to take some totals according to different criteria. Every row have a different criteria, and the criteria is stored in the same row.

A figure worth a thousand words, so below is what I’m trying to achieve:

| Expense     | Criteria | Jan  | Feb  | ... |
|-------------|----------|------|------|-----|
| A           | Here     | 1000 | 900  | ... |
| B           | There    | 250  | 300  | ... |
| C           | Here     | 400  | 125  | ... |
| Here Total  |          | 1400 | 1025 | ... |
| There Total |          | 250  | 300  | ... |

I’ve tried SUMIF and SUMIFS, but I was unable to succeed. Any help is greatly appreciated.

Hi

For example wih SUMIF, see SumForText.ods

Regards

Thanks for the example!

Based on the sample data above sumif.ods does what you need using SUMIF()

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

Thanks for the answer. That’s really what I’ve wanted.