SOLVED

# Countif Date

Copper Contributor

# Countif Date

I can get the formula to work if I manually type in the date. However, with data validation, I have a dropdown list of the first day of the month. So, since it's June, it says 06/01/24, and the cell next to it finds the last day of the month. Instead of manually typing the dates in the formula, I want to be able to select the date in the cell instead.

=COUNTIFS(T_LEAVE[START DATE],">=6/1/24",T_LEAVE[START DATE],"<=6/30/24")

5 Replies
best response confirmed by itsmatta (Copper Contributor)
Solution

# Re: Countif Date

Perhaps

``=COUNTIFS(T_LEAVE[START DATE],">=" & A1,T_LEAVE[START DATE],"<=" & EOMONTH(A1,0) )``

if drop-down with first date of months in A1

# Re: Countif Date

@itsmatta You can concatenate the cell reference to the criteria, like below.  This assumes that E5 has the first day of the month, and F5 has the last day of the month.

=COUNTIFS(T_LEAVE[START DATE],">=" & E5,T_LEAVE[START DATE],"<=" & F5)

# Re: Countif Date

Haha. Sergei beat me to the answer.

# Re: Countif Date

I was on the right track, but couldn't for reason figure out why I couldn't get it to work. Appreciate you both! Thank you!

# Re: Countif Date

1 best response

Accepted Solutions
best response confirmed by itsmatta (Copper Contributor)
Solution

# Re: Countif Date

Perhaps

``=COUNTIFS(T_LEAVE[START DATE],">=" & A1,T_LEAVE[START DATE],"<=" & EOMONTH(A1,0) )``

if drop-down with first date of months in A1