Frequency Function with Times

Bench

Board Regular
Joined
Aug 27, 2009
Messages
134
Hi,

Struggling to get the Frequency Function to work with time.

In Column B i have dd/mm/yyyy hh:mm this is exported from a Database.

I want to know how many cases arrived between each hour of the day.

I've used Text=(B2,"hh:mm") and also tried Text=(B2,"hh:mm:ss") to extract the time in.

I've then added 00:00 to 23:00 in O2:O25 and used the array formula:

Code:
=FREQUENCY(C2:C60,O2:O26)

But i only get zeros back.

Where am i going wrong? :(
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi Bench

Changing the format of the values achieves nothing since the excel function uses the values.

The Text function returns (as its name says) a text. The Frequency function works with numbers and so you won't get any result.

Just use O2:O25 as the bins range, and for the values use directly the range in column A (if they are really datetimes).

To check if a value in column A are numeric, use =ISNUMBER(A2). If the result is False, then convert the values in column A to excel datetime before applying the Frequency function.
 
Upvote 0
Hi Pgc01,

Thanks for your reply, it does indeed work if i add "dd/mm/yyyy" to my bin, the issue is that i would like to trend the times of day things come in, hence why i was trying to lose the date and simply keep the hh:mm:ss, the only way i know how to do this is using the TEXT formula, is there another way to seperate the cells contents? both mid and right give funny results.

Thanks
 
Upvote 0
Bench

The unit for the datetime in excel is the day. This means that the integer part of the value is the date and the decimal part of the value is the time.

To get just the time out of a datetime value you just have to extract the decimal part

=MOD(A2,1)

and format the cell as time.
 
Upvote 0
If I want to do this with dates!

How can I ?

I just want the frequencies of people between certain years 1930,1940,1950,1960 etc!

Excel Workbook
N
24-Dec-1950
34-Oct-1949
44-Oct-1949
511-Sep-1946
611-Sep-1946
717-Jul-1949
817-Jul-1949
919-Jul-1941
1019-Jul-1941
114-Jun-1931
124-Jun-1931
135-Oct-1940
149-Feb-1964
159-Feb-1964
169-Feb-1964
179-Feb-1964
189-Feb-1964
194-Mar-1968
204-Mar-1968
214-Mar-1968
224-Mar-1968
2318-Sep-1956
248-Jun-1959
258-Jun-1959
2626-Jun-1937
2726-Jun-1937
2826-Jun-1937
2926-Jun-1937
3026-Jun-1937
3126-Jun-1937
Data Cleaned-Blanks Removed
 
Upvote 0
Hey Man!

Sorry to be a pain!

However I keep on having no success sadly.

zirpdf.jpg
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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