SUMIFS (not blank, and othe conditions)

ryan picture ryan · Jun 15, 2016 · Viewed 32.8k times · Source

I am trying to use SUMIFS to sum a couple of conditions. I want my sum range to be column A and my first criteria range is column B, the criteria is that column B has something in it or essentially it isn't blank/0. The next criteria is if column C matches the year which is simple and I can get that to work, but my problem arises from the criteria of the first test. I have tried:

  1. SUMIFS(column A, column B, column B > 0, column C, "16")
  2. SUMIFS(column A, column B, column B <> 0, column C, "16")
  3. SUM(SUMIFS(column A, column B, "1", column C, "16"), SUMIFS(column A, column B, "2", column C, "16"), SUMIFS(column A, column B, "3", column C, "16")...

Obviously, I do not want to use option 3 but it did seem to give me the right result. If I knew that the number in column B would be always under 5 then I may use this but as of now, I have to assume the number in column B can be from 0-1000. Is there something I am missing here?
All I want to do is sum up column A if column B is not blank or 0. Thanks.

Answer

Renier picture Renier · Feb 21, 2018

Better answer found at ExcelJet

Use only "<>" as criteria, e.g.

=SUMIF(C5:C11,"<>",D5:D11)

This allows rows in criteria column to be included if their value is zero, thus excluding ONLY blanks in the criteria column.