# Thread: Array formula for unique dates for specific names Thanks:  1 Post #5308688 (1) Likes:  1 Post #5308688 (1)

1. ## Array formula for unique dates for specific names

Hello,

I am trying to count the number of unique dates between 1/1/2018 and 12/31/2019 for specific Well names. For example, Well Name (29-6 64N) has 5 rows of dates in which 4 of those are unique and the other is repeated. Is there a way to count how many dates are unique for each Well Name?

Well Name is in column B with 1039 rows
Dates are in column I with 1039 rows

keep in mind that I have a sheet without repeated Well Names so now im just trying to add how many times the names are repeated by using the dates as a reference

thank you

2. ## Re: Array formula for unique dates for specific names

Hi,

Below should work for you:

ABCDE
1WellDate
229-6 64N7/12/201929-6 64N4
329-6 64N7/12/2019
429-6 64N7/12/2019
529-6 64N7/12/2019
629-6 64N7/12/2019
729-6 64N7/12/2019
829-6 64N7/13/2019
929-6 64N7/14/2019
1029-6 64N7/15/2019
1129-6 32N7/16/2019
1229-6 32N7/14/2019
1329-6 32N7/15/2019
1429-6 32N7/15/2019
1529-6 32N7/15/2019
1629-6 32N7/15/2019
1729-6 32N7/15/2019
1829-6 32N7/15/2019
1929-6 32N7/15/2019

Sheet2

Array Formulas
CellFormula
E2{=SUM(IF(FREQUENCY(IF(\$A\$2:\$A\$19=D2,B2:B19),B2:B19),1))}
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

3. ## Re: Array formula for unique dates for specific names

Thank you so much!!!

5. ## Re: Array formula for unique dates for specific names

By any chance do you know where to add a criteria where it does the same thing but in a date range??

6. ## Re: Array formula for unique dates for specific names

Originally Posted by Aryatect
I don't know how to tag people so you can see this haha

7. ## Re: Array formula for unique dates for specific names

Hi, Sorry missed this, will this work?

ABCDEF
1WellDate
229-6 64N7/12/201929-6 64N7/12/20191
329-6 64N7/12/2019
429-6 64N7/12/2019
529-6 64N7/12/2019
629-6 64N7/12/2019
729-6 64N7/12/2019
829-6 64N7/13/2019
929-6 64N7/14/2019
1029-6 64N7/15/2019
1129-6 32N7/16/2019
1229-6 32N7/14/2019
1329-6 32N7/15/2019
1429-6 32N7/15/2019
1529-6 32N7/15/2019
1629-6 32N7/12/2019
1729-6 32N7/20/2019
1829-6 32N7/15/2019
1929-6 32N7/15/2019

Sheet2

Array Formulas
CellFormula
F2{=SUM(IF(FREQUENCY(IF((\$A\$2:\$A\$19=D2)*(\$B\$2:\$B\$19=E2),\$B\$2:\$B\$19),\$B\$2:\$B\$19),1))}
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

8. ## Re: Array formula for unique dates for specific names

How would it be for like "<"&Date(2019,1,1) so basically everything before 2019

9. ## Re: Array formula for unique dates for specific names

so in place of \$B\$2:\$B\$19=E2 use \$B\$2:\$B\$19 < Date(2019,1,1)

Code:

Code:
```=SUM(IF(FREQUENCY(IF((\$A\$2:\$A\$19=D2)*(\$B\$2:\$B\$19 < Date(2019,1,1)),\$B\$2:\$B\$19),\$B\$2:\$B\$19),1))
```

Enter with Ctrl+Shift+Enter

10. ## Re: Array formula for unique dates for specific names

the issues is that i have dates from 2018 in between those of 2019