Counting Function Results

Coaster750New

New Member
Joined
Sep 8, 2017
Messages
6
I have a spreadsheet of many tens of thousands of rows and wish to prune the data to make it more manageable.
It is the output of a monitoring system that spits out a row of data every 15 minutes.
What I want to do is count how many rows of data there are at (say) a quarter past the hour, up to an end date (say, 1/1/23). I can use this in my macro then for various purposes.
I know how to use MINUTE() to get the minute value into a new column and then use COUNTIF on the new column but I don't want to do that as I will have to check through several macros to make sure they are addressing the correct columns.
Does anyone know how to count the occurrences of data at 15 minute intervals please?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to the forum!

You can use the CEILING function to determine your quarter hour groups.
Could you provide some sample data to use in your scenario? (xl2bb add in or a table paste, no images please).


Cell Formulas
RangeFormula
B2:B16B2=CEILING(A2,1/96)
C2:C16C2=FORMULATEXT(B2)
 
Last edited:
Upvote 0
Thanks for your swift reply.

I'm not sure this will help much but the data is in the form of a left hand column of Date/Time and then 60 odd columns of sensor readings of which I have shown three below. There are no formulae and I don't want any.

I do not want to add any more columns. I just want a cell (e.g. A1) that shows the total number of cells at either 15 minutes, 30 minutes, 45 minutes or on the hour. The minutes value (e.g. 15) will be entered in cell A2 (say).

Maybe this is not possible but I had to ask on here.

Many thanks again.

15/07/2023 00:003.684.855.54
15/07/2023 00:153.684.855.49
15/07/2023 00:303.684.855.44
15/07/2023 00:453.674.855.35
15/07/2023 01:003.674.855.32
15/07/2023 01:153.664.855.28
15/07/2023 01:303.664.855.25
15/07/2023 01:453.664.855.20
15/07/2023 02:003.664.855.16
15/07/2023 02:153.654.855.06
15/07/2023 02:303.654.855.04
15/07/2023 02:453.654.855.02
15/07/2023 03:003.654.854.99
15/07/2023 03:153.654.854.96
15/07/2023 03:303.654.854.92
15/07/2023 03:453.654.854.89
 
Upvote 0
I'm still not 100% sure of what you want.
But , take a look at this:

Book1
ABCD
16>> Count
200:45:00>> Quarter Hour
3
415/07/2023 00:003.684.855.54
515/07/2023 00:153.684.855.49
615/07/2023 00:303.684.855.44
715/07/2023 00:453.674.855.35
815/07/2023 01:003.674.855.32
915/07/2023 01:153.664.855.28
1015/07/2023 01:303.664.855.25
1115/07/2023 01:453.664.855.20
1215/07/2023 02:003.664.855.16
1315/07/2023 02:153.654.855.06
1415/07/2023 02:303.654.855.04
1515/07/2023 02:453.654.855.02
1615/07/2023 03:003.654.854.99
1715/07/2023 01:003.674.855.32
1815/07/2023 01:153.664.855.28
1915/07/2023 01:303.664.855.25
2015/07/2023 01:453.664.855.20
2115/07/2023 02:003.664.855.16
2215/07/2023 02:153.654.855.06
2315/07/2023 02:303.654.855.04
2415/07/2023 02:453.654.855.02
2515/07/2023 03:003.654.854.99
2615/07/2023 03:153.654.854.96
2715/07/2023 03:303.654.854.92
2815/07/2023 03:453.654.854.89
Sheet1
Cell Formulas
RangeFormula
A1A1=SUM(--(ROUND(MINUTE(A4:A28),5)=ROUND(MINUTE(A2),5)))
A2A2=TIME(0,45,0)
 
Upvote 0
Thanks for your swift reply.

I'm not sure this will help much but the data is in the form of a left hand column of Date/Time and then 60 odd columns of sensor readings of which I have shown three below. There are no formulae and I don't want any.

I do not want to add any more columns. I just want a cell (e.g. A1) that shows the total number of cells at either 15 minutes, 30 minutes, 45 minutes or on the hour. The minutes value (e.g. 15) will be entered in cell A2 (say).

Maybe this is not possible but I had to ask on here.

Many thanks again.

15/07/2023 00:003.684.855.54
15/07/2023 00:153.684.855.49
15/07/2023 00:303.684.855.44
15/07/2023 00:453.674.855.35
15/07/2023 01:003.674.855.32
15/07/2023 01:153.664.855.28
15/07/2023 01:303.664.855.25
15/07/2023 01:453.664.855.20
15/07/2023 02:003.664.855.16
15/07/2023 02:153.654.855.06
15/07/2023 02:303.654.855.04
15/07/2023 02:453.654.855.02
15/07/2023 03:003.654.854.99
15/07/2023 03:153.654.854.96
15/07/2023 03:303.654.854.92
15/07/2023 03:453.654.854.89

I'm still not 100% sure of what you want.
But , take a look at this:

Book1
ABCD
16>> Count
200:45:00>> Quarter Hour
3
415/07/2023 00:003.684.855.54
515/07/2023 00:153.684.855.49
615/07/2023 00:303.684.855.44
715/07/2023 00:453.674.855.35
815/07/2023 01:003.674.855.32
915/07/2023 01:153.664.855.28
1015/07/2023 01:303.664.855.25
1115/07/2023 01:453.664.855.20
1215/07/2023 02:003.664.855.16
1315/07/2023 02:153.654.855.06
1415/07/2023 02:303.654.855.04
1515/07/2023 02:453.654.855.02
1615/07/2023 03:003.654.854.99
1715/07/2023 01:003.674.855.32
1815/07/2023 01:153.664.855.28
1915/07/2023 01:303.664.855.25
2015/07/2023 01:453.664.855.20
2115/07/2023 02:003.664.855.16
2215/07/2023 02:153.654.855.06
2315/07/2023 02:303.654.855.04
2415/07/2023 02:453.654.855.02
2515/07/2023 03:003.654.854.99
2615/07/2023 03:153.654.854.96
2715/07/2023 03:303.654.854.92
2815/07/2023 03:453.654.854.89
Sheet1
Cell Formulas
RangeFormula
A1A1=SUM(--(ROUND(MINUTE(A4:A28),5)=ROUND(MINUTE(A2),5)))
A2A2=TIME(0,45,0)
That works perfectly thanks very much.
 
Upvote 0
Great, happy to help.
Best Wishes.
Can I be cheeky please?
Is there a way of finding the first occurrence of(say) the 15 minute reading?
I've not used the way you showed me before and am not 100% sure how it works for anything other than "Sum" but it would be very handy to have a cell that shows where the first one is. Row number would be ideal.
Sorry for taking up your time.
Thanks again
 
Upvote 0
Can I be cheeky please?
Is there a way of finding the first occurrence of(say) the 15 minute reading?
I've not used the way you showed me before and am not 100% sure how it works for anything other than "Sum" but it would be very handy to have a cell that shows where the first one is. Row number would be ideal.
Sorry for taking up your time.
Thanks again
Take a look at the last three columns for how the COUNT formula in cell A2 woarks.
Also there are formulas for the ROW nbr of worksheet as well as Record number in the lookup range:
(subsequent edit: After looking at the way I have it here the "ROUND" functions are not needed. But, to be most accurate because of floating decimal issues, the functions may need to be reversed.... so MINUTE(ROUND(..... )) instead of ROUND(MINUTE(...).)

Book1
ABCDEFGH
145>>Desired Minute of any hour to check
26>> CountLogic of Counting Formula (Cell A2)
300:45>> Quarter Hour=SUM(--(ROUND(MINUTE(A7:A31),5)=ROUND(MINUTE(A3),5)))
410>> Row Nbr of worksheet 1st Occsum trues/falses
54>> Row In Matrix 1st Occurance6
6ROUND(MINUTE(A7:A31),5)"="ROUND(MINUTE(A3),5)
715/07/2023 00:003.684.855.540FALSE45
815/07/2023 00:153.684.855.4915FALSE45
915/07/2023 00:303.684.855.4430FALSE45
1015/07/2023 00:453.674.855.3545TRUE45
1115/07/2023 01:003.674.855.320FALSE45
1215/07/2023 01:153.664.855.2815FALSE45
1315/07/2023 01:303.664.855.2530FALSE45
1415/07/2023 01:453.664.855.2045TRUE45
1515/07/2023 02:003.664.855.160FALSE45
1615/07/2023 02:153.654.855.0615FALSE45
1715/07/2023 02:303.654.855.0430FALSE45
1815/07/2023 02:453.654.855.0245TRUE45
1915/07/2023 03:003.654.854.990FALSE45
2015/07/2023 01:003.674.855.320FALSE45
2115/07/2023 01:153.664.855.2815FALSE45
2215/07/2023 01:303.664.855.2530FALSE45
2315/07/2023 01:453.664.855.2045TRUE45
2415/07/2023 02:003.664.855.160FALSE45
2515/07/2023 02:153.654.855.0615FALSE45
2615/07/2023 02:303.654.855.0430FALSE45
2715/07/2023 02:453.654.855.0245TRUE45
2815/07/2023 03:003.654.854.990FALSE45
2915/07/2023 03:153.654.854.9615FALSE45
3015/07/2023 03:303.654.854.9230FALSE45
3115/07/2023 03:453.654.854.8945TRUE45
Sheet1
Cell Formulas
RangeFormula
A2A2=SUM(--(ROUND(MINUTE(A7:A31),5)=ROUND(MINUTE(A3),5)))
A3A3=TIME(0,A1,0)
A4A4=MATCH(ROUND(MINUTE(A3),5),ROUND(MINUTE(A7:A31),5),0)+ROW(A6)
A5A5=MATCH(ROUND(MINUTE(A3),5),ROUND(MINUTE(A7:A31),5),0)
G5G5=SUM(--(G7:G31))
F7:F31F7=ROUND(MINUTE(A7:A31),5)
G7:G31G7=F7=H7
H7:H31H7=ROUND(MINUTE($A$3),5)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,148
Members
452,615
Latest member
bogeys2birdies

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