Sorting Times

jedilefty

New Member
Joined
Nov 14, 2017
Messages
46
Office Version
  1. 365
Platform
  1. Windows
Afternoon!

I need help with sorting time stamps into groups based on which hour block it occurred. The time stamps are in military format, so the desired outcome can either stay in the same format or regular 12hr format [which ever is easier]. And the date itself will always be the same, just different time intervals. I have a sample table below.

Time StampHour Block
7/7/23 11:01
11
7/7/2023 11:0511
7/7/23 10:42
10
7/7/23 11:02
11
7/7/23 15:11
15 or 3
7/7/23 10:52
10
7/7/23 15:12
15 or 3
7/7/23 17:10
17 or 5
7/7/23 18:14
18 or 6
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
If your entries are valid date/time entries, you can simply use the HOUR function to pull the hour out.
For example, if cell A2 is "7/7/23 18:14" then this formula:
Excel Formula:
=HOUR(A2)
will return 18
 
Upvote 0

Forum statistics

Threads
1,215,179
Messages
6,123,495
Members
449,100
Latest member
sktz

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