Forum Discussion

LBendix's avatar
LBendix
Copper Contributor
Apr 21, 2022
Solved

Need help to find the right code/ function

I have a relatively large dataset with registrations (numbers) from a specific time, each hour for many months (just a small sample shown here).

I want to sum up every number that is registered at every hour during the whole period.
Which function/ code can I use for that?

 

TimeNumber of registrationsNo of registrations/ 03:00No of registrations/ 04:00No of registrations/ 05:00etc…
2021-07-01 03:001????
2021-07-01 04:000    
2021-07-01 05:000    
2021-07-01 06:000    
2021-07-01 07:001    
2021-07-01 08:001    
2021-07-01 09:001    
2021-07-01 10:0014    
2021-07-01 11:002    
2021-07-01 12:001    
2021-07-01 13:000    
2021-07-01 14:000    
2021-07-01 15:002    
2021-07-01 16:000    
2021-07-01 17:000    
2021-07-01 18:001    
2021-07-01 19:000    
2021-07-01 20:000    
2021-07-01 21:001    
2021-07-01 22:000    
2021-07-01 23:000    
2021-07-02 00:000    
2021-07-02 01:000    
2021-07-02 02:000    
2021-07-02 03:000    
2021-07-02 04:001    
2021-07-02 05:002    
2021-07-02 06:002    
2021-07-02 07:000    
2021-07-02 08:002    
2021-07-02 09:000    
2021-07-02 10:000    
2021-07-02 11:000    
2021-07-02 12:001    
2021-07-02 13:001    
2021-07-02 14:000    
2021-07-02 15:000    
2021-07-02 16:001    
2021-07-02 17:000    
2021-07-02 18:000    
2021-07-02 19:000    
2021-07-02 20:001    
2021-07-02 21:000    
2021-07-02 22:000    
2021-07-02 23:000    
2021-07-03 00:000    
2021-07-03 01:000    
2021-07-03 02:001    
2021-07-03 03:000    
2021-07-03 04:001    
2021-07-03 05:000    
2021-07-03 06:004    
2021-07-03 07:000    
2021-07-03 08:002    
2021-07-03 09:002    
2021-07-03 10:000    
2021-07-03 11:002    
2021-07-03 12:000    
2021-07-03 13:002    
2021-07-03 14:003    
2021-07-03 15:000    
2021-07-03 16:000    
2021-07-03 17:000    
2021-07-03 18:001    
2021-07-03 19:000    
2021-07-03 20:003    
2021-07-03 21:002    
2021-07-03 22:001    
2021-07-03 23:001    
2021-07-04 00:001    

 

  • LBendix 

     

    Working with your sample, I first put in row 1, the hours 0, 1, 2, 3, 4, 5, 6....etc

    Then in Row 2 the following formula, referring to Row 1 for the hours

    =SUM(FILTER($B2:$B71,HOUR($A2:$A71)=C1,0))

    And that gets the totals for each hour. Here's a screen grab, but I've also attached the spreadsheet.

     

2 Replies

  • mathetes's avatar
    mathetes
    Gold Contributor

    LBendix 

     

    Working with your sample, I first put in row 1, the hours 0, 1, 2, 3, 4, 5, 6....etc

    Then in Row 2 the following formula, referring to Row 1 for the hours

    =SUM(FILTER($B2:$B71,HOUR($A2:$A71)=C1,0))

    And that gets the totals for each hour. Here's a screen grab, but I've also attached the spreadsheet.

     

    • LBendix's avatar
      LBendix
      Copper Contributor
      Thank you very much, mathetes!
      This solved my problem!!

Resources