Categorizing time data into 15 minute periods.

bwaites

New Member
Joined
Oct 11, 2018
Messages
1
Hi!

I have a large group of data which has number of bat calls (split by species) and then the time of each the calls.
I would like to group the calls into 15 minute periods in relation to sunset eg 15 minutes before sunset, 0-15 minutes after sunset, 15-30 minutes after sunset, 30-45 mins after and so on.

Is there an formula i can use to group the data in this way?

The next bit which i have struggled with is that when it goes past midnight, i would still like it to continue, however currently whatever i try excel is seeing it as a the next day and getting the time completely wrong.
For example if a have a bat call at 4am and sunset was at 7pm the night before excel is registering it as being 15hrs early rather than 9 hours later.


Here is a example version of what i have currently (but a lot less!)

[TABLE="width: 500"]
<tbody>[TR]
[TD]Time[/TD]
[TD]Common Pipistrelle[/TD]
[TD]Soprano Pipistrelle[/TD]
[TD]Brown long-eared[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19:01[/TD]
[TD]36[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19:02[/TD]
[TD]57[/TD]
[TD]7[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19:03[/TD]
[TD]32[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19:07[/TD]
[TD]31[/TD]
[TD]12[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
If you want to use time that spans more than one day then the simplest way is it needs a date component too. Time to excel is a fraction of 1. A day is 1. Date times such as 22/10/2018 09:14 is just a number (43395.3847222222) formatted to look like a date time. The 43395 is the number of days since 01/01/1900. The 0.384722 is the fraction of a day that has passed ie 9 hours 14 mins past midnight. Hope that explains that. To group your data you first need to sort out your date times so things that happen after midnight get placed correctly.
 
Upvote 0
To the times in the time column have a date part?
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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