Search code examples
arraysif-statementgoogle-sheetsgoogle-sheets-formulasumproduct

How to sum up all the lines in the table below that are not FALSE without SUMPRODUCT


I need your help to sum up all the lines in the table below that are not FALSE...

Here's what I'm doing so far, for each line:

=IF(OR(A1="En cours";A1="Engagé"); NETWORKDAYS.INTL(IF(MONTH(NOW())=MONTH(B1);B1;EOMONTH(TODAY();-1)+1);IF(MONTH(NOW())=MONTH(C1);C1;EOMONTH(TODAY();0));"1110111";holidays) * 7 * D1)
  • if A is "Engagé" or "En cours"
  • then I want to count the number of Thursdays within the current month
  • and multiply that number by 7 and then D...

Can you help me, please?

enter image description here

Also, Here's the link to the spreadsheet.

Thanks! ^_^


Solution

  • You can use SUM or SUMIF.

    Using SUM will not recognize non numerical data, FALSE will be ignored.

    =SUM(F1:F124)
    

    For SUMIF you can use:

    =SUMIF(F1:F124, ">0")
    
     or 
    
    =SUMIF(F1:F124, "<>FALSE")
    

    References