Need to count rows only if there are 4 or more values in a certain hour on a certain date

cdcomer

New Member
Joined
Aug 13, 2018
Messages
1
Hi -

Admittedly a newbie.

I am analyzing a file with 16811 rows.

We have interval start data that shows date, hour, minute per quarter hour (00, 15, 30, 45). If they do not meet this criteria, those rows are out of scope for our current analysis

We wish to analyze and chart only the data where there are 4 or more entries for the date and hour. (Some projects have more than one meter, so there could be more than 4 entries for those projects, which is why we are after 4 or more)

In the sample data below, we would not want to count the date 6/1 with start hours 9, 13, 14 or 15.
In the sample data below, we want to count the date 6/1 with the start hours 10, 11 and 12.

Each file spans a month, so the date and hour are the variables. What formula will we use to flag the data for further analysis? We have also added separate columns for day, month and hour if that helps to flag the data we're after.



[TABLE="width: 558"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]INTERVAL_START_TIME[/TD]
[TD]Start Day[/TD]
[TD]Start Month[/TD]
[TD]Start Hour[/TD]
[TD]<3[/TD]
[/TR]
[TR]
[TD]6/1/2018 9:15[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6/1/2018 9:30[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6/1/2018 9:45[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6/1/2018 10:00[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6/1/2018 10:15[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6/1/2018 10:30[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6/1/2018 10:45[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[T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[/TD]
[TD]14[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6/1/2018 15:30[/TD]
[TD]6/1[/TD]
[TD]6[/TD]
[TD]15[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi there,
try the COUNTIFS formula
In your example a formula for column E (example E2):
=COUNTIFS($B$2:$B$1000,B2,$C$2:$C$1000,C2,$D$2:$D$1000,D2)
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

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