SOLVED

Need assist with formula

Copper Contributor

I have a list of registrations and want to count the number in each category (T, S) that occurs at every whole hour. If no registration at a certain time, it should fill inn "0". (Dataset is below)
Want it to look like this (example):  

  Category 
Date TimeTS
2021-07-0400:001 
2021-07-0401:001 
2021-07-0402:0011
2021-07-0403:001 
2021-07-0404:003 
2021-07-0405:002 
    

 

 

Dataset:

DateHourCategory
   
2021-07-0400.38T
2021-07-0401.04T
2021-07-0402.01S
2021-07-0402.33T
2021-07-0403.11T
2021-07-0404.05T
2021-07-0404.06T
2021-07-0404.23T
2021-07-0405.28T
2021-07-0405.28T
2021-07-0406.09T
2021-07-0406.33T
2021-07-0407.03T
2021-07-0407.09S
2021-07-0407.51T
2021-07-0407.56T
2021-07-0408.17T
2021-07-0408.18T
2021-07-0408.29T
2021-07-0408.44T
2021-07-0409.05T
2021-07-0409.05T
2021-07-0409.23T
2021-07-0410.34T
2021-07-0410.38T
2021-07-0411.22S
2021-07-0411.40T
2021-07-0411.54T
2021-07-0412.16T
2021-07-0412.30S
2021-07-0413.17T
2021-07-0414.42S
2021-07-0415.59T
2021-07-0416.42S
2021-07-0420.01T
2021-07-0420.55T
2021-07-0421.07T
2021-07-0421.13T
2021-07-0421.39T
2021-07-0422.18T
2021-07-0422.22T
2021-07-0422.22T
2021-07-0422.29T
2021-07-0422.50T
2021-07-0422.53T
2021-07-0423.41T
2021-07-0500.33T
2021-07-0501.37T
2021-07-0502.29T
2021-07-0503.07S
2021-07-0504.07T
2021-07-0504.07T
2021-07-0504.33S
2021-07-0504.48S
2021-07-0505.05T
2021-07-0505.56T
2021-07-0506.19T
2021-07-0506.58S
2021-07-0507.12S
2021-07-0507.52S
2021-07-0506.54T
2021-07-0508.32S
2021-07-0508.41T
2021-07-0509.03T
2021-07-0509.16T
2021-07-0509.18T
2021-07-0509.34T
2021-07-0509.57T
2021-07-0510.21T
2021-07-0510.31S
2021-07-0510.43T
2021-07-0510.58T
2021-07-0511.10T
2021-07-0512.26S
2021-07-0512.42T
2021-07-0514.19S
2021-07-0515.01T
2021-07-0515.04S
2021-07-0515.40T
2021-07-0515.46T
2021-07-0515.48T
2021-07-0515.42T
2021-07-0516.04T
2021-07-0516.27S
2021-07-0516.48T
2021-07-0517.27T
2021-07-0517.29T
2021-07-0517.48T
2021-07-0518.20T
2021-07-0518.27T
2021-07-0518.36T
2021-07-0518.46T
2021-07-0519.01T
2021-07-0519.31S
2021-07-0519.38T
2021-07-0520.01T
2021-07-0520.02S
2021-07-0520.51S
2021-07-0521.28S
2021-07-0521.45S
2021-07-0521.50T
2021-07-0522.08S
2021-07-0522.12S
2021-07-0522.17T
2021-07-0522.20T
2021-07-0522.28S
2021-07-0522.44T
2021-07-0522.54T
2021-07-0523.52T
2021-07-0601.01S
2021-07-0601.07S
2021-07-0603.19T
2021-07-0603.20S
2021-07-0604.10S
2021-07-0604.13T
2021-07-0605.14T
2021-07-0605.23T
2021-07-0605.46S
2021-07-0605.53S
2021-07-0606.04T
2021-07-0606.42T
2021-07-0606.56T
2021-07-0607.08T
2021-07-0607.29T
2021-07-0607.29T
2021-07-0607.37T
2021-07-0607.37T
2021-07-0607.37T
2021-07-0607.41T
2021-07-0607.41T
2021-07-0607.49T
2021-07-0607.51T
2021-07-0607.57T
2021-07-0608.00T
2021-07-0608.00T
2021-07-0608.06S
2021-07-0608.06T
2021-07-0608.08T
2021-07-0608.11T
2021-07-0608.38T
2021-07-0609.08T
2021-07-0609.11T
2021-07-0610.04T
2021-07-0610.05T
2021-07-0610.06T
2021-07-0610.20T
2021-07-0610.26T
2021-07-0610.39T
2021-07-0610.40T
2021-07-0610.42S
2021-07-0610.45T
2021-07-0611.05T
2021-07-0611.18T
2021-07-0611.18T
2021-07-0611.28T
2021-07-0611.41T
2021-07-0611.45S
2021-07-0612.26T
2021-07-0612.29T
2021-07-0612.34S
2021-07-0612.44T
2021-07-0612.49T
2021-07-0612.55T
2021-07-0613.33T
2021-07-0615.20T
2021-07-0616.16T
2021-07-0616.21S
2021-07-0616.23T
2021-07-0616.30T
2021-07-0616.52S
2021-07-0617.03T
2021-07-0617.04T
2021-07-0617.28T
2021-07-0617.29T
2021-07-0617.38T
2021-07-0617.38T
2021-07-0618.00T
2021-07-0618.14T
2021-07-0618.15T
2021-07-0618.23S
2021-07-0618.58T
2021-07-0618.59T
2021-07-0619.10T
2021-07-0619.23T
2021-07-0619.39T
2021-07-0619.50T
2021-07-0620.14T
2021-07-0620.27T
2021-07-0622.00T
2021-07-0623.52T
2021-07-0701.01S
2021-07-0701.07S
2021-07-0703.19T
2021-07-0703.20S
2021-07-0704.10S
2021-07-0704.13T
2021-07-0705.04S
2021-07-0705.14T
2021-07-0705.46S
2021-07-0705.53S
2021-07-0706.04T
2021-07-0706.42T
2021-07-0706.56T
2021-07-0707.08T
2021-07-0707.29T
2021-07-0707.29T
2021-07-0707.37T
2021-07-0707.37T
2021-07-0707.37T
2021-07-0707.40S
2021-07-0707.43S
2021-07-0707.44T
2021-07-0708.00T
2021-07-0708.10T
2021-07-0708.16S
2021-07-0708.19T
2021-07-0708.36S
2021-07-0708.48T
2021-07-0709.10T
2021-07-0709.18T
2021-07-0709.28T
2021-07-0709.34T
2021-07-0709.46T
2021-07-0710.03S
2021-07-0710.19S
2021-07-0710.24S
2021-07-0710.53T
2021-07-0711.39T
2021-07-0711.43T
2021-07-0713.43T
2021-07-0714.07T
2021-07-0714.54T
2021-07-0715.07T
2021-07-0717.56T
2021-07-0718.01T
2021-07-0718.15S
2021-07-0719.19T
2021-07-0719.45T
2021-07-0719.49S
2021-07-0719.49T
2021-07-0720.07T
2021-07-0720.41T
2021-07-0721.45T
2021-07-0806.00T
2021-07-0808.14T
2021-07-0808.27T
2021-07-0808.49T
2021-07-0809.01T
2021-07-0809.10T
2021-07-0809.21T
2021-07-0809.51T
2021-07-0809.52S
2021-07-0809.52T

 

6 Replies

@LBendix 

One option is a pivottable - see the attached sample workbook.

I added an auxiliary column "Hour (rounded)" to the source data, and used that instead of the Hour column in the pivot table.

I changed the pivot table to tabular format, specified that it should have no subtotals and grand totals, and that labels should be repeated.

@LBendix 

You can add a working column 'Round hour' next to your data

Then using HOUR function you can get the round (whole hours).

Then you can summarize the results with COUNTIF or pivot table

@Kolyu Minevski 

I used the HOUR and COUNTIF to get half way, but still need input on the code to summarize/ sum up the numbers each hour/ date. Please see the attached dataset
Any input is appreciated. Thanks again!

Not very familiar with pivot unfortunately, but thanks anyway!
best response confirmed by LBendix (Copper Contributor)
Solution

@LBendix 

See the attached version. It uses SUMPRODUCT, not COUNTIF.

Thank you, this solved it!
1 best response

Accepted Solutions
best response confirmed by LBendix (Copper Contributor)
Solution

@LBendix 

See the attached version. It uses SUMPRODUCT, not COUNTIF.

View solution in original post