简体   繁体   中英

How to use countifs function to count multiple criteria involving dates?

=COUNTIFS($C$2:$C$20000,MONTH(8),$K$2:$K$20000,"U")

Where C column is the list of dates, K column is another criteria i want to meet.

Here I'm attempting to count whenever Column C is within the month of August and Column K value is "U", the above formula i used return 0 where I expecting some values.

Not sure what is the problem with my formula.

Month() formula won't work inside COUNTIFS formula, you can use SUMPRODUCT instead:

=SUMPRODUCT((MONTH($C$2:$C$20000)=8)*($K$2:$K$20000="U"))

Or add an extra column to your data, calculate month in it, and use COUNTIFS with the new column.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM