Forum Discussion
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")
Perhaps
=COUNTIFS(T_LEAVE[START DATE],">=" & A1,T_LEAVE[START DATE],"<=" & EOMONTH(A1,0) )
if drop-down with first date of months in A1
Perhaps
=COUNTIFS(T_LEAVE[START DATE],">=" & A1,T_LEAVE[START DATE],"<=" & EOMONTH(A1,0) )
if drop-down with first date of months in A1
- Steve_SumProductComIron Contributor
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)
- Steve_SumProductComIron ContributorHaha. Sergei beat me to the answer.
- itsmattaCopper ContributorI 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!