Forum Discussion

NatashaTF's avatar
NatashaTF
Copper Contributor
Aug 21, 2023

Counting rows with specific dates

Hi I am trying to count the number or rows with an August date from the following data

18/08/2023
18/08/2023
16/08/2023
15/08/2023
08/08/2023
04/08/2023
04/08/2023
02/08/2023
02/08/2023
02/08/2023
26/07/2023
25/07/2023
19/04/2023
14/02/2023
09/02/2023

I am using this formula =COUNTIF(A1:A15,"<01/08/2023") but it as giving me the answer 5 when I need it to give me the answer 10 as I need to count each occurrence of a date.

 

  • NatashaTF But that's what's in your formula. Count the number of dates before August 1.

    Use this in stead:

    =COUNTIF(A1:A15,">=01/08/2023")

     

    Or use COUNTIFS like this in case you explicitly want to set the upper and lower date limits.

    =COUNTIFS(A1:A15,"<=31/08/2023",A1:A15, ">=01/08/2023")

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    NatashaTF But that's what's in your formula. Count the number of dates before August 1.

    Use this in stead:

    =COUNTIF(A1:A15,">=01/08/2023")

     

    Or use COUNTIFS like this in case you explicitly want to set the upper and lower date limits.

    =COUNTIFS(A1:A15,"<=31/08/2023",A1:A15, ">=01/08/2023")

    • NatashaTF's avatar
      NatashaTF
      Copper Contributor
      Thank you: i was being a bit dumb I see 😉

Share