•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
Our take
If you're looking to generate a series of hourly intervals between a specified start and end date, focusing only on the hours from 9 AM to 9 PM, you can accomplish this with a tailored approach. Instead of generating all 24 hours, adjust your formula to capture just the desired range. By leveraging the power of spreadsheets, you can create a sequence that lists each hour for every date within your defined range, ensuring a clear and organized output that enhances your productivity.
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]
Read on the original site
Open the publisher's page for the full experience
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