Home > Software engineering >  Need to count unique incident ID #s that fall within a date range - Google Sheets
Need to count unique incident ID #s that fall within a date range - Google Sheets

Time:10-19

Good Afternoon,

I have a table that looks like this:

IncidentDate IncidentID
8/12/2021 154541
8/14/2021 154542
8/14/2021 154543
8/17/2021 154544
8/18/2021 154545
8/18/2021 154545

I'm trying to write a formula that would count the number of unique IncidentIDs within a certain date range and display that total in a third column. In this case I am breaking down by month, but I'll also need to be able to define more specific ranges by week and by day of the week, if possible.

My apologies if I am asking too much, I am fairly new to this field.

Any help is greatly appreciated.

CodePudding user response:

there is COUNTUNIQUEIFS and it goes like:

=COUNTUNIQUEIFS(B1:B, A1:A, ">=8/14/2021", A1:A, "<8/18/2021")

enter image description here

enter image description here

enter image description here

  • Related