Google Sheets Formula – Sum Values in Column Containing Specific Word

formulasgoogle sheets

Let's use this random spreadsheet to illustrate my problem.

enter image description here

What I want to do is a sum of all Page Views (F) that contains the Category (B) named /Online Computers. Which formula can I use to do that?

I wanted to Google it before asking here but I'm not sure how this is called.

Best Answer

You can use the =SUMIF as MaryC says, or the =FILTER function that I usually prefer:

  =SUM(FILTER(F2:F, B2:B = "/Online Computers"))

The =FILTER function filters your data so that only rows matching B2:B = "/Online Computers" are included.

See the example spreadsheet I've set up, and the Google spreadsheets function list.