im looking to count for specific months lets say month 6 and 7 because its holiday .
I have found this function on the net here in very down of page .
=COUNT(FILTER(A2:A;(A2:A-DAY(A2:A))<=DATE(C1;D1;0);(B2:B-DAY(B2:B))>=DATE(C1;D1;0)))
where C1 is year to search and D1 is the month number to search and i have modified it like that
=IF(YEAR(H204)=YEAR(J204);
COUNT(FILTER(H204;(H204-DAG(H204))<=DATE(YEAR(H204);6;0);(J204-DAY(J204))>=DATE(YEAR(J204);6;0)))+COUNT(FILTER(H204;(H204-DAG(H204))<=DATE(YEAR(H204);7;0);(J204-DAY(J204))>=DATE(YEAR(J204);7;0))) ;
IF(J204="";
COUNT(FILTER(H204;(H204-DAY(H204))<=DATE(YEAR(H204);6;0);(J204-DAY(TODAY()))>=DATE(YEAR(H204);6;0)))+COUNT(FILTER(H204;(H204-DAG(H204))<=DATUM(YEAR(H204);7;0);(J204-DAG(TODAY()))>=DATE(YEAR(H204);7;0)))+
COUNT(FILTER(H204;(H204-DAY(H204))<=DATE(YEAR(TODAY());6;0);(J204-DAG(TODAY()))>=DATE(YEAR(TODAY());6;0)))+COUNT(FILTER(J204;(H204-DAY(H204))<=DATE(YEAR(TODAY());7;0);(J204-DAY(TODAY()))>=DATE(YEAR(TODAY());7;0)));
COUNT(FILTER(H204;(H204-DAG(H204))<=DATE(YEAR(H204);6;0);(J204-DAY(J204))>=DATE(YEAR(H204);6;0)))+COUNT(FILTER(H204;(H204-DAG(H204))<=DATE(YEAR(H204);7;0);(J204-DAY(J204))>=DATE(YEAR(H204);7;0)))+
COUNT(FILTER(H204;(H204-DAY(H204))<=DATE(YEAR(J204);6;0);(J204-DAY(J204))>=DATE(YEAR(J204);6;0)))+COUNT(FILTER(H204;(H204-DAY(H204))<=DATE(YEAR(J204);7;0);(J204-DAY(J204))>=DATE(YEAR(J204);7;0)))
)
)
because the first formulas is not really right . From this function i wrote it works BUT only when the second column J204=""
is empty i want to use TODAY
s date .
so i replaced this
(J204-DAY(J204)) ---> (J204-DAY(TODAY()) in line4 and 5
But i dont know how to replace J204 ?
How can i make this working pls ?
EDIT
to make it clear i have just problem if the column J is empty (No date) so i want instead use TODAY
instead of J204 so how can i switch this
(J204-DAY(J204)) to TODAY ??