Seeking help with excel formula to count unique text within a date range

jmavillarroel

New Member
Joined
May 28, 2020
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I am looking to count the total (unduplicated) number of children that were seen in the month of April (between 4/1/2020 and 4/30/2020) using an excel formula. Sumproduct? Countifs? (some cells may have blanks) Thank you for any help!! :)

Date SeenYouth Name
3/31/2020Angel Rodriguez
3/31/2020Tim Smith
4/1/2020
4/2/2020Jakob Young
4/3/2020Chloe Flowers
4/6/2020Mriah Boswell
4/6/2020Travonna Paine
4/7/2020Aidan Boyles
4/7/2020Chloe Flowers
4/7/2020Cheyna Rain
4/7/2020Moses Josephs
4/8/2020Jason Boswell
4/8/2020Grace Willows
4/9/2020Matthew Cox
4/9/2020Christian Jackson
4/10/2020Starasia Lebel
4/10/2020Zachary Timmons
4/13/2020Breanna Stewart
4/13/2020Dominic Lane
4/13/2020Zachary Timmons
4/14/2020Moses Josephs
4/15/2020Kailey Stewart
4/16/2020Chloe Flowers
4/16/2020Matthew Cox
4/16/2020Christian Jackson
4/16/2020Brooke Shields
4/17/2020Starasia Lebel
4/17/2020Chayton Drake
4/20/2020Mriah Boswell
4/20/2020Travonna Paine
4/20/2020Christopher Klein
4/20/2020Zachary Timmons
4/21/2020Dominic Lane
4/21/2020Moses Josephs
4/21/2020Destiny Boysen
4/21/2020Cheyna Rain
4/22/2020Jason Boswell
4/23/2020Christian Jackson
4/24/2020Chayton Drake
4/24/2020Christian Braden
4/24/2020Brooke Shields
4/28/2020Robert Lee
4/28/2020Dominic Lane
4/29/2020Grace Willows
4/29/2020Kailey Stewart
4/29/2020Zachary Timmons
5/1/2020Joe Smith
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
One way of doing this is with Power Query. Filter out March and May. Determine Unique items. Count the number of Youths.

Here is the Mcode for that procedure.

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date Seen", type date}, {"Youth Name", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Date Seen] <> #date(2020, 3, 31) and [Date Seen] <> #date(2020, 5, 1))),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Youth Name"}, {{"Count", each Table.RowCount(Table.Distinct(_)), type number}}),
#"Filtered Rows1" = Table.SelectRows(#"Grouped Rows", each ([Youth Name] <> null)),
#"Added Index" = Table.AddIndexColumn(#"Filtered Rows1", "Index", 1, 1),
#"Removed Columns" = Table.RemoveColumns(#"Added Index",{"Count"})
in
#"Removed Columns"

 
Upvote 0
Try this array formula. Change ranges to match your data.
Formula must be entered with CTRL-SHIFT-ENTER.

Book1
ABCD
1Date SeenYouth Name
23/31/2020Angel RodriguezStart4/1/2020
33/31/2020Tim SmithEnd4/30/2020
44/1/2020
54/2/2020Jakob YoungCount22
64/3/2020Chloe Flowers
74/6/2020Mriah Boswell
84/6/2020Travonna Paine
94/7/2020Aidan Boyles
104/7/2020Chloe Flowers
114/7/2020Cheyna Rain
124/7/2020Moses Josephs
134/8/2020Jason Boswell
144/8/2020Grace Willows
154/9/2020Matthew Cox
164/9/2020Christian Jackson
174/10/2020Starasia Lebel
184/10/2020Zachary Timmons
194/13/2020Breanna Stewart
204/13/2020Dominic Lane
214/13/2020Zachary Timmons
224/14/2020Moses Josephs
234/15/2020Kailey Stewart
244/16/2020Chloe Flowers
254/16/2020Matthew Cox
264/16/2020Christian Jackson
274/16/2020Brooke Shields
284/17/2020Starasia Lebel
294/17/2020Chayton Drake
304/20/2020Mriah Boswell
314/20/2020Travonna Paine
324/20/2020Christopher Klein
334/20/2020Zachary Timmons
344/21/2020Dominic Lane
354/21/2020Moses Josephs
364/21/2020Destiny Boysen
374/21/2020Cheyna Rain
384/22/2020Jason Boswell
394/23/2020Christian Jackson
404/24/2020Chayton Drake
414/24/2020Christian Braden
424/24/2020Brooke Shields
434/28/2020Robert Lee
444/28/2020Dominic Lane
454/29/2020Grace Willows
464/29/2020Kailey Stewart
474/29/2020Zachary Timmons
485/1/2020Joe Smith
Sheet2
Cell Formulas
RangeFormula
D5D5=SUM(IF(FREQUENCY(IF($B$2:$B$48<>"",IF($A$2:$A$48>=$D$2,IF($A$2:$A$48<=$D$3,MATCH($B$2:$B$48,$B$2:$B$48,0)))),ROW($B$2:$B$48)-ROW($B$2)+1),1))
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,242
Members
448,951
Latest member
jennlynn

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