Overview
Data google doc> https://docs.google.com/spreadsheets/d/16eTH7k7oNJcILEL8qCNKIBbg4EvkKAaRYtbN2PhfXCg/edit#gid=0
Tried formulas:
Result
Question:
You cannot use WEEKNUM with COUNTIF, without a helper column to do the WEEKNUM.
Use SUMPRODUCT instead:
=SUMPRODUCT(--(WEEKNUM(A2:A9)=1))
Or since you already have the helper column in Column B, you can use COUNTIF on that:
=COUNTIF(B:B,1)
Question:
- what am i doing wrong?
The wrong syntax for COUNTIF .
Scott is right.
You can either use SUMPRODUCT
directly or use a helper column beside and use a COUNTIF
.
=SUMPRODUCT(--(WEEKNUM(A2:A9)=1))
=COUNTIF(B:B,1)
The reason to have --
is that SUMPRODUCT
ignores non-numeric entries. Thus we need to transfer Ture/False to 1/0.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.