Search code examples
arraysgoogle-sheetsgoogle-sheets-formulagoogle-sheets-querygoogle-query-language

Monday count only


I just want to count the dates Monday of each number in column C filtered by column A. But it is giving an error in the formula:

=NETWORKDAYS.INTL (JANEIRO!C2, "1"; FEVEREIRO!C2, "1 ")

drive link here


Solution

  • paste in A2 cell and drag down:

    =ARRAYFORMULA(SUM(N(REGEXMATCH(""&TRIM(SPLIT(QUERY({JANEIRO!A$2:C; FEVEREIRO!A$2:C}; 
     "select Col1 where dayOfWeek(Col3) = 2"; 0); ",")); "^"&TO_TEXT(A2)&"$"))))
    

    0


    spreadsheet demo