Formula - Calculate Calls Per Hour

mtranx0

New Member
Joined
Aug 10, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I was able to setup a Pivot table to calculate how many calls per hour. Like
July 1
7am - 6 calls
8am - 1 call
9am - 8 calls
etc.

But how would I do this with a formula?

Here's the table:

DateTimeOffered
7/1/2021 7:00:003
7/1/2021 7:15:001
7/1/2021 7:30:001
7/1/2021 7:45:001
7/1/2021 8:30:001
7/1/2021 9:00:003
7/1/2021 9:15:002
7/1/2021 9:30:001
7/1/2021 9:45:002
7/1/2021 10:15:002
7/1/2021 10:30:000
7/1/2021 10:45:001
7/1/2021 11:00:000
7/1/2021 11:45:001
7/1/2021 12:00:001
7/1/2021 12:30:001
7/1/2021 12:45:001
7/1/2021 13:00:001
7/1/2021 13:15:000
7/1/2021 13:30:002
7/1/2021 13:45:001
7/1/2021 14:45:002
7/1/2021 15:00:002
7/1/2021 15:15:001
7/1/2021 15:30:001
7/1/2021 15:45:000
7/1/2021 16:15:001
7/1/2021 16:30:001
7/1/2021 16:45:001
7/1/2021 17:45:001
7/1/2021 18:00:001
7/2/2021 8:30:001
7/2/2021 8:45:003
7/2/2021 9:00:002
7/2/2021 9:15:002
7/2/2021 9:30:002
7/2/2021 9:45:001
7/2/2021 10:00:000
7/2/2021 10:15:001
7/2/2021 10:30:000
7/2/2021 10:45:003
7/2/2021 11:00:002
7/2/2021 11:15:004
7/2/2021 11:30:000
7/2/2021 12:15:001
7/2/2021 12:30:001
7/2/2021 12:45:001
7/2/2021 13:00:002
7/2/2021 13:15:000
7/2/2021 13:30:001
7/2/2021 13:45:002
7/2/2021 14:00:001
7/2/2021 14:15:000
7/2/2021 15:00:001
7/2/2021 15:15:000
7/2/2021 16:00:003
7/2/2021 16:15:001
7/2/2021 16:45:000
7/6/2021 7:00:001
7/6/2021 7:15:000
7/6/2021 7:30:001
7/6/2021 8:00:001
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi and welcome to MrExcel,

From the look to the table above, it looks like you're counting "something" in a time frame of 15 minutes. If your basic data is structured like this or does the formula needs to provide for timeframes of 15 minutes is something i can't determine.
So, generally speaking: this can be done by formula but to help you in detail: Can you provide some sample data.
 
Upvote 0
Hi! The table is the sample data :) The offered column is the number of calls we get every 15 minutes. But I want to calculate how many calls per hour like
July 1
7am - 6 calls
8am - 1 call
9am - 8 calls
etc.
 
Upvote 0
Hi,

try this and see if this is fit for purpose:
Book1
ABCDEF
1DateTimeOfferedHoursOffered
21-7-2021 07:00378
31-7-2021 07:15186
41-7-2021 07:301915
51-7-2021 07:451107
61-7-2021 08:301117
71-7-2021 09:003126
81-7-2021 09:152139
91-7-2021 09:301143
101-7-2021 09:452155
111-7-2021 10:152167
121-7-2021 10:300171
131-7-2021 10:451181
141-7-2021 11:000
Sheet2
Cell Formulas
RangeFormula
E2:E13E2=UNIQUE(HOUR(A2:A63-INT(A2:A63)))
F2:F13F2=SUMPRODUCT((HOUR(A2:A63-INT(A2:A63))=E2)*(B2:B63))
Dynamic array formulas.
 
Upvote 0
Thank you so much!!!! Yes this helps with the summary but is there a way to calculate how many calls each hour by day? Like July 1 7am - 6 calls, July 2 7am - 0 calls etc.
 
Upvote 0
Something like this:

Book1
ABCDEF
1DateTimeOfferedHoursOffered
21-7-2021 07:0031-7-2021 07:006
31-7-2021 07:1511-7-2021 08:001
41-7-2021 07:3011-7-2021 09:008
51-7-2021 07:4511-7-2021 10:003
61-7-2021 08:3011-7-2021 11:001
71-7-2021 09:0031-7-2021 12:003
81-7-2021 09:1521-7-2021 13:004
91-7-2021 09:3011-7-2021 14:002
101-7-2021 09:4521-7-2021 15:004
111-7-2021 10:1521-7-2021 16:003
121-7-2021 10:3001-7-2021 17:001
131-7-2021 10:4511-7-2021 18:001
141-7-2021 11:0002-7-2021 08:004
151-7-2021 11:4512-7-2021 09:007
161-7-2021 12:0012-7-2021 10:004
171-7-2021 12:3012-7-2021 11:006
181-7-2021 12:4512-7-2021 12:003
191-7-2021 13:0012-7-2021 13:005
201-7-2021 13:1502-7-2021 14:001
211-7-2021 13:3022-7-2021 15:001
221-7-2021 13:4512-7-2021 16:004
231-7-2021 14:4526-7-2021 07:002
241-7-2021 15:0026-7-2021 08:001
Sheet2
Cell Formulas
RangeFormula
E2:E24E2=UNIQUE(INT(A2:A63)+(HOUR(A2:A63)/24))
F2:F24F2=SUMPRODUCT((INT(A2:A63)+(HOUR(A2:A63)/24)=E2)*(B2:B63))
Dynamic array formulas.
 
Upvote 0
Solution
Thank you so much!

Sorry I'm so new but I was wondering how you did the E column? Did you just copy =UNIQUE(INT(A2:A63)+(HOUR(A2:A63)/24)) all the way down? I tried doing that but it basically had each hour show up multiple times like:
7/1/2021 7:00:00
7/1/2021 7:00:00
7/1/2021 7:00:00
7/1/2021 7:00:00
7/1/2021 8:00:00
7/1/2021 9:00:00
7/1/2021 9:00:00
7/1/2021 9:00:00
7/1/2021 9:00:00
 
Upvote 0
Hi,

your account details mentioned the usage of 365 as office version.
So I’ve used the O365 function unique.
Just enter it in E2 (only!) as mentioned and O365 will automatically extend the range for you.
 
Upvote 0
Yes thank you so much! I was working off Google Sheet that's why. This was exactly what I was looking for thanks so much!
 
Upvote 0

Forum statistics

Threads
1,214,992
Messages
6,122,631
Members
449,095
Latest member
bsb1122

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