•1 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
Generate a series of hour intervals for a date range
I've got a start date and an end date, and I need to generate a sequence of hours for each of the dates in between the start and end dates, but I don't need all 24 hours in a day, only from 9am to 9pm.
I need the generated series to look like:
01/01/2026 09:00:00
01/01/2026 10:00:00
01/01/2026 11:00:00
...
01/01/2026 20:00:00
01/01/2026 21:00:00
02/01/2026 09:00:00
02/01/2026 10:00:00
02/01/2026 11:00:00
...
02/01/2026 20:00:00
02/01/2026 21:00:00
(and so on)
I've found a formula to generate all 24 hours for a year, but I'm not sure how to adjust it, or if there's any other/better ways:
=SEQUENCE( (endDate - startDate) *3*24,,startDate,1/24)
[link] [comments]
Want to read more?
Check out the full article on the original site
Tagged with
#Excel alternatives for data analysis
#natural language processing for spreadsheets
#generative AI for data analysis
#rows.com
#AI formula generation techniques
#Excel compatibility
#formula generator
#Excel alternatives
#hour intervals
#9am to 9pm
#sequence of hours
#date range
#generated series
#start date
#end date
#schedule generation
#SEQUENCE function
#date calculation
#Excel formula
#hours of operation