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]
[/TR]
[TR]
[TD]20
[/TD]
[TD]19:30
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]21
[/TD]
[TD]20:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]22
[/TD]
[TD]20:30
[/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]23
[/TD]
[TD]21:00
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]24
[/TD]
[TD]21:30
[/TD]
[TD]8
[/TD]
[/TR]
</tbody>[/TABLE]
Hi,
I've been trying to write a function to eliminate certain data in a COUNTIFS with no success
Suppose I have the above data that shows how many tasks are being performed at a certain time. I want to show the peak number of tasks, but do not want to include tasks that do not occur for one hour or less (less than 2 consecutive occurrences). In this set, the peak would occur at 11:30 with 13 tasks; 14 and 15 would be eliminated because they do not occur for more than an hour.
The best I can come up with is:
COUNTIF(A1:A24,MAX(A1:A24))>2)
This eliminates 15 because it only occurs twice, but still counts 14 because it occurs three times. I want to also eliminate 14 because it does not occur for more than one consecutive hour. I also see the possibility where data may occur like this: "...,14,15,15,14,...". In this case 14 would be counted because there would be 14 tasks occurring consecutively for more than one hour.
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]10:00
[/TD]
[TD]8
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]10:30
[/TD]
[TD]9
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]11:00
[/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]11:30
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]12:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]12:30
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]13:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]13:30
[/TD]
[TD]14
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]14:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]14:30
[/TD]
[TD]15
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]15:00
[/TD]
[TD]15
[/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]15:30
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]13
[/TD]
[TD]16:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]14
[/TD]
[TD]16:30
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD]17:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]16
[/TD]
[TD]17:30
[/TD]
[TD]14
[/TD]
[/TR]
[TR]
[TD]17
[/TD]
[TD]18:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]18
[/TD]
[TD]18:30
[/TD]
[TD]14
[/TD]
[/TR]
[TR]
[TD]19
[/TD]
[TD]19:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]20
[/TD]
[TD]19:30
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]21
[/TD]
[TD]20:00
[/TD]
[TD]13
[/TD]
[/TR]
[TR]
[TD]22
[/TD]
[TD]20:30
[/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]23
[/TD]
[TD]21:00
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]24
[/TD]
[TD]21:30
[/TD]
[TD]8
[/TD]
[/TR]
</tbody>[/TABLE]
Hi,
I've been trying to write a function to eliminate certain data in a COUNTIFS with no success
Suppose I have the above data that shows how many tasks are being performed at a certain time. I want to show the peak number of tasks, but do not want to include tasks that do not occur for one hour or less (less than 2 consecutive occurrences). In this set, the peak would occur at 11:30 with 13 tasks; 14 and 15 would be eliminated because they do not occur for more than an hour.
The best I can come up with is:
COUNTIF(A1:A24,MAX(A1:A24))>2)
This eliminates 15 because it only occurs twice, but still counts 14 because it occurs three times. I want to also eliminate 14 because it does not occur for more than one consecutive hour. I also see the possibility where data may occur like this: "...,14,15,15,14,...". In this case 14 would be counted because there would be 14 tasks occurring consecutively for more than one hour.