# Formula to Count Unique Values in Column based on Date Ranges in Another

#### jonnycuest

##### New Member
Hello,

I am looking to count unique values in 1 column with criteria that involves date ranges from TODAY()-30 and TODAY() in another column.

Unique Values in Column D:D
Date Ranges in Column V:V which need to fall between TODAY()-30 and TODAY

I can't figure out how to get both of these working together in one formula.

Thank you!

### Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

#### Fluff

##### MrExcel MVP, Moderator
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

#### jonnycuest

##### New Member
Thanks Fluff,

I mostly just need to know how to count how many unique email addresses there are between a date range using the TODAY()-30 and TODAY ranges:

Ex. ('B:B">="&TODAY()-30,'B:B"<="&TODAY())

#### Fluff

##### MrExcel MVP, Moderator

Those "dates" look to be text, are they?

#### jonnycuest

##### New Member
Those "dates" look to be text, are they?
Yes I believe they are. They just come in as General format.

#### Fluff

##### MrExcel MVP, Moderator

+Fluff 1.xlsm
ABC
1EmailCreated At
2jonnycuest@.com2021-06-19 23:22:58 UTC3
3johndavidpetersen@.com2021-06-20 15:11:30 UTC
4johndpetersen82@.com2021-06-22 01:05:38 UTC
5jonnycuest@.com2021-06-23 20:05:23 UTC
6johndavidpetersen@.com2021-06-29 01:12:56 UTC
7johndpetersen82@.com2021-06-29 04:05:31 UTC
8jonnycuest@.com2021-06-30 14:43:49 UTC
9johndavidpetersen@.com2021-07-01 00:16:42 UTC
10johndpetersen82@.com2021-07-02 05:30:55 UTC
Data
Cell Formulas
RangeFormula
C2C2=ROWS(UNIQUE(FILTER(A2:A10,(LEFT(B2:B10,10)+0>TODAY()-30)*(LEFT(B2:B10,10)+0<TODAY()))))

#### jonnycuest

##### New Member
+Fluff 1.xlsm
ABC
1EmailCreated At
2jonnycuest@.com2021-06-19 23:22:58 UTC3
3johndavidpetersen@.com2021-06-20 15:11:30 UTC
4johndpetersen82@.com2021-06-22 01:05:38 UTC
5jonnycuest@.com2021-06-23 20:05:23 UTC
6johndavidpetersen@.com2021-06-29 01:12:56 UTC
7johndpetersen82@.com2021-06-29 04:05:31 UTC
8jonnycuest@.com2021-06-30 14:43:49 UTC
9johndavidpetersen@.com2021-07-01 00:16:42 UTC
10johndpetersen82@.com2021-07-02 05:30:55 UTC
Data
Cell Formulas
RangeFormula
C2C2=ROWS(UNIQUE(FILTER(A2:A10,(LEFT(B2:B10,10)+0>TODAY()-30)*(LEFT(B2:B10,10)+0<TODAY()))))
thank you!!! is there any way to include ISNA to print 0 if no data is available?

#### Fluff

##### MrExcel MVP, Moderator
Excel Formula:
``=IFERROR(ROWS(UNIQUE(FILTER(A2:A10,(LEFT(B2:B10,10)+0>TODAY()-1)*(LEFT(B2:B10,10)+0<TODAY())))),0)``

#### jonnycuest

##### New Member
Excel Formula:
``=IFERROR(ROWS(UNIQUE(FILTER(A2:A10,(LEFT(B2:B10,10)+0>TODAY()-1)*(LEFT(B2:B10,10)+0<TODAY())))),0)``
Thank you!!!!!

Replies
4
Views
100
Replies
2
Views
459
Replies
3
Views
253
Replies
9
Views
304
Replies
5
Views
74

1,147,731
Messages
5,742,849
Members
423,758
Latest member

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back