count unique dates based multiple criteria within given date range

aceif

New Member
Joined
Jun 4, 2015
Messages
2
I'm using the formula =ArrayFormula(SUM(--(FREQUENCY(IF(Data!A:A=D2,Data!B:B),Data!B:B)>0))) to count unique Dates in Column B if Column A matches the name in Column D however I'm struggling to refine the formula to only give me unique dates within the date range specified in F2 and G2




NameDateNameNo. of ShiftsFromUntil
Anthony Brown01/05/2015Peter Gray401/05/201527/05/2015
Anthony Brown01/05/2015Tim Sherwood17
Anthony Brown01/05/2015Sachin Patel16
Anthony Brown01/05/2015Anthony Brown19
Anthony Brown01/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown04/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015
Anthony Brown05/05/2015

<tbody>
</tbody>
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi,
In column A put a blank column called count.
assuming your names and dates are in B and C with individual names in E. Reults in F and Dates in G and H.

Type this formula in A2 and copy down =IF(OR(B2<>B1,C2<>C1),1,0).

In F2 type this formula =SUM(IF($B$2:$B$60=$E2,IF($C$2:$C$60>=$G$2,IF($C$2:$C$60<=$H$2,$A$2:$A$60)))).

Its an array formula that requires you to press Ctrl, Shift and Enter Keys all at the same time. Done correctly you will see { and } at the start and end of the formula.

I have only used 60 rows to test it.Adjust the formula as required.

Good luck.
 
Upvote 0
What are you requiring - a unique count of dates per name related to the From-Until interval?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,861
Members
449,052
Latest member
Fuddy_Duddy

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