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

jonnycuest

New Member
Joined
Nov 6, 2017
Messages
22
Office Version
  1. 365
Platform
  1. Windows
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!
 
I'm comparing it to the solution provided and I'm not seeing any brackets out of place. Can you advise?

=IFERROR(ROWS(UNIQUE(FILTER(A2:A10,(LEFT(B2:B10,10)+0>TODAY()-1)*(LEFT(B2:B10,10)+0<TODAY())))),0)
=IFERROR(ROWS(UNIQUE(FILTER('CF - MM Main'!D:D,(LEFT('CF - MM Main'!V:V,10)+0>TODAY()-1)*(LEFT('CF - MM Main'!V:V,10)+0<TODAY())))),0)

These have the brackets in the same place
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
These have the brackets in the same place
My eyesight must be playing tricks on me. You're quite right.

It maybe that either there are no dates that match the criteria, or the values in col V are not being recognised as dates after taking the 1st 10 characters.
 
Upvote 0
Thanks,

So the values in that column are general text exported from another system. They look like this: 2021-07-13 12:19:04 UTC
The formula should be picking them up.

I am kind of stumped.

I've even split them into a column with just the date and it's still not counting correctly.
 
Upvote 0
Ok, when I added the IfError, I obviously change the formula for some reason, it should be Today()-30 not -1
 
Upvote 0
Oh that's not really the issue. I am using -1 and -30 and -365 in different iterations of this formula. I have checked the -1 and it should be adding up to 2. It is showing 0. Just FYI.
 
Upvote 0
Well the -1 will always result in 0 as a date cannot be greater than 13 Jul AND less than 14 Jul
 
Upvote 0
oh nvm, I just did -2 and called it a day. thank you. sheesh. my bad for wasting so much time. I get it now.
 
Upvote 0
Glad it's sorted & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,588
Members
449,039
Latest member
Arbind kumar

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top