Sorting time Blocks
Hello,
can you please advise me on how to write these time blocks so they can be sorted based on time? we do not want to use 24 hr format. the number before each time block is representative of the quarter in each hour. so for example 1- is 5 to 5:15 and 2- is 5:15 to 5:30. we really need to enable sorting on this . thanks all
1 - 5:00 AM PT - 6:00 AM PT
2 - 5:00 AM PT - 6:00 AM PT
3 - 5:00 AM PT - 6:00 AM PT
4 - 5:00 AM PT - 6:00 AM PT
1 - 6:00 AM PT - 7:00 AM PT
2 - 6:00 AM PT - 7:00 AM PT
3 - 6:00 AM PT - 7:00 AM PT
4 - 6:00 AM PT - 7:00 AM PT
1 - 7:00 AM PT - 8:00 AM PT
2 - 7:00 AM PT - 8:00 AM PT
3 - 7:00 AM PT - 8:00 AM PT
4 - 7:00 AM PT - 8:00 AM PT
1 - 8:00 AM PT - 9:00 AM PT
2 - 8:00 AM PT - 9:00 AM PT
3 - 8:00 AM PT - 9:00 AM PT
4 - 8:00 AM PT - 9:00 AM PT
1 - 9:00 AM PT - 10:00 AM PT
2 - 9:00 AM PT - 10:00 AM PT
3 - 9:00 AM PT - 10:00 AM PT
4 - 9:00 AM PT - 10:00 AM PT
1 - 10:00 AM PT - 11:00 AM PT
2 - 10:00 AM PT - 11:00 AM PT
3 - 10:00 AM PT - 11:00 AM PT
4 - 10:00 AM PT - 11:00 AM PT
1 - 11:00 AM PT - 12:00 PM PT
2 - 11:00 AM PT - 12:00 PM PT
3 - 11:00 AM PT - 12:00 PM PT
4 - 11:00 AM PT - 12:00 PM PT
1 - 12:00 PM PT - 1:00 PM PT
2 - 12:00 PM PT - 1:00 PM PT
3 - 12:00 PM PT - 1:00 PM PT
4 - 12:00 PM PT - 1:00 PM PT
1 - 1:00 PM PT - 2:00 PM PT
2 - 1:00 PM PT - 2:00 PM PT
3 - 1:00 PM PT - 2:00 PM PT
4 - 1:00 PM PT - 2:00 PM PT
Answers
-
You could take the hour followed by the number as a decimal in a helper column and then sort on the helper column.
=VALUE(MID([Column Name]@row, 5, FIND(":", [Column Name]@row) - 5) + "." + LEFT([Column Name]@row)) + IF(AND(FIND("PM", [Column Name]@row> 0, MID([Column Name]@row, 5, FIND(":", [Column Name]@row) - 5) <> "12"), 12, 0)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 146 Just for fun
- 63 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!