countif multiple criteria but ignore duplicates

SKooLZ

New Member
Joined
Oct 7, 2014
Messages
30
Hi Guys, hope you can help me with a countif formula to count the days the running activity was done and ignore the amount of times it might have been done in the same day. The count for running days must equals 3 in the example table below.



[TABLE="width: 498"]
<tbody>[TR]
[TD]Activity[/TD]
[TD]Date[/TD]
[TD][/TD]
[TD="colspan: 2"]Total Running Days[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]Running Track[/TD]
[TD="align: right"]08/06/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Running Track[/TD]
[TD="align: right"]08/06/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Running Fell[/TD]
[TD="align: right"]09/06/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Swimming[/TD]
[TD="align: right"]01/06/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Hockey[/TD]
[TD="align: right"]02/02/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Swimming[/TD]
[TD="align: right"]03/03/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Volleyball[/TD]
[TD="align: right"]04/03/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Running Track[/TD]
[TD="align: right"]04/04/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Running Track[/TD]
[TD="align: right"]04/04/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Also, is this possible without using an array formula?

Many thanks in advance...
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Are you wanting to count the number of distinct days for the 'running track' activity?
 
Last edited:
Upvote 0
Hi Aladin Akyurek, thanks for your prompt response.

Yes, distinct days for the cells containing the word 'Running'

Many Thanks..

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][/tr]
[tr][td]
1​
[/td][td]Activity[/td][td]Date[/td][td][/td][td]# distinct days:[/td][/tr]

[tr][td]
2​
[/td][td]Running Track[/td][td]
8/6/2015​
[/td][td][/td][td]running[/td][/tr]

[tr][td]
3​
[/td][td]Running Track[/td][td]
8/6/2015​
[/td][td][/td][td]
3​
[/td][/tr]

[tr][td]
4​
[/td][td]Running Fell[/td][td]
9/6/2015​
[/td][td][/td][td][/td][/tr]

[tr][td]
5​
[/td][td]Swimming[/td][td]
1/6/2015​
[/td][td][/td][td][/td][/tr]

[tr][td]
6​
[/td][td]Hockey[/td][td]
2/2/2015​
[/td][td][/td][td][/td][/tr]

[tr][td]
7​
[/td][td]Swimming[/td][td]
3/3/2015​
[/td][td][/td][td][/td][/tr]

[tr][td]
8​
[/td][td]Volleyball[/td][td]
4/3/2015​
[/td][td][/td][td][/td][/tr]

[tr][td]
9​
[/td][td]Running Track[/td][td]
4/4/2015​
[/td][td][/td][td][/td][/tr]

[tr][td]
10​
[/td][td]Running Track[/td][td]
4/4/2015​
[/td][td][/td][td][/td][/tr]
[/table]


D3, control+shift+enter (cse), not just enter:

=SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH(D2,$A$2:$A$10)),$B$2:$B$10),$B$2:$B$10),1))

By the way, no need to worry about an array-processing formula, requiring cse.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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