if-statementgoogle-sheetssumgoogle-sheets-formulasumifs

How to input a discontinuous range into SUMIF in Google Sheets


I'm trying to do a SUMIF in Google Sheets, however since my input is a discontinuous range, it gives me an error. I am looking for a solution that does not require a Google Apps Script.

Works fine:

=SUMIF(A1:A9, "<>N/A")

Doesn't work:

=SUMIF(A1,A3,A7, "<>N/A")

Is there any method for doing a SUMIF with a non-continuous range as in the above non-working example?


Solution

  • try like this:

    =SUMIF({A1; A3; A7}, "<>N/A")