Search code examples
excelexcel-formulagoogle-sheetsspreadsheetgoogle-sheets-query

Add cell values having particular text


First, I know that DSUM and SUMIF works with the values in the entire cell. I would like to know if I can add values of cells where part of the string contains a particular text.

Let me explain. I use Google Sheets to manage my expenses, and gather data about my financials. I have something like this—

enter image description here

As you can see, above is a typical example of a day. Each cell has a category, and a description, and below it, the value in the next row. Now is it possible to add values of the cell containing the word "TAXIS"? This way I should be able to get a sum of expenses for a particular category.

I've tried a vast number of expense managers, but none that I am happy with. Finally have decided to go the manual route, and here I am. Any help would be appreciated. Thanks in advance!


Solution

  • You can use wild card to add part of string. Suppose you data starts from C2 cell and data goes like your screenshot then you can use following formula.

    =SUMIF(C2:K2,"*TAXIS*",C3:K3)
    

    Obviously you have to customize formula based on your sheet from where data starts and ends.