Sheets: COUNTUNIQUEIFS with date criteria

jtilleyx

New Member
Joined
Jul 3, 2021
Messages
6
Office Version
  1. 2010
I have the following formula that works:

=COUNTUNIQUEIFS(Data!F:F,Data!A:A,B1)

This references a name in B1 and reviews matches for that name in a DATA tab - column A. If it finds a match, it returns a value of how many unique departments the name appeared in - from column F in DATA tab.

I need to add one more piece to this but haven't found a way to make it work. I need the formula above to work the same, but only between specific dates. The Start Date is in A1 and the End Date is in A2 of the main tab (same tab as B1 name reference)

Any help would be greatly appreciated
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi there...

Note that this suggestion is untetsted as yet...

You can modify the formula by adding two more criteria using the COUNTIFS function to specify the date range. Here's how you can possibly modify the formula:

Excel Formula:
=COUNTUNIQUEIFS(Data!F:F,Data!A:A,B1,Data!G:G,">="&A1,Data!G:G,"<="&A2)


In this modified formula, we added two more criteria:

  1. Data!G:G,">="&A1: This criteria checks if the date in column G of the DATA tab is greater than or equal to the start date in A1 of the main tab.
  2. Data!G:G,"<="&A2: This criteria checks if the date in column G of the DATA tab is less than or equal to the end date in A2 of the main tab.
By using these criteria, the formula will count unique values in column F of the DATA tab that match the name in B1 AND are within the date range specified in A1 and A2 of the main tab.

I hope this helps!
 
Upvote 0
Solution
Hi there..

Glad we could assist and thanks for the feedback...
 
Upvote 0

Forum statistics

Threads
1,215,949
Messages
6,127,880
Members
449,411
Latest member
AppellatePerson

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