How to Create Date Range From Two Dates in Excel

Learn multiple Excel methods to create date range from two dates with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
11 min read • Last updated: 7/2/2025

How to Create Date Range From Two Dates in Excel

Why This Task Matters in Excel

When you manage schedules, budgets, or plans, you almost always work with start and finish dates. Project managers build Gantt charts, accountants forecast cash flows, HR teams calculate employee leave, and sales analysts create rolling forecasts. In every one of those cases, you need the complete list of dates that falls between two boundary dates so you can allocate resources, enter daily actuals, or simply mark progress.

Imagine a logistics coordinator planning deliveries for a route that runs from 01-Jul-2024 to 15-Jul-2024. Without a fast way to generate the 15 sequential dates, she could waste time typing or risk typos that disrupt downstream formulas. Analysts in finance departments often use date ranges to calculate daily interest, currency rates, or stock valuations. Marketing specialists schedule social posts or email campaigns on every weekday between campaign start and end dates. Even educators use date ranges to build academic calendars and assignment trackers.

Excel is ideal for this task because it mixes date arithmetic, dynamic arrays, and classic fill tools in a single environment. It integrates the list you generate directly into pivot tables, charts, and Power Query models. If you skip learning this skill, you may resort to manual typing or clumsy VBA scripts, both of which introduce errors, consume time, and limit scalability. Mastering date-range generation reinforces other Excel concepts—such as absolute vs. relative references, spill ranges, and array manipulation—so it pays dividends in many adjacent workflows.

Finally, the techniques you learn here connect to broader skills like conditional formatting (to highlight weekends in the generated range), data validation (to prevent inverted dates), and dashboarding (to feed calendar visuals). In short, creating a date range from two dates is a deceptively simple task that anchors many sophisticated spreadsheet solutions.

Best Excel Approach

For users on Microsoft 365 or Excel 2021, the SEQUENCE function is by far the most efficient, readable, and dynamic way to create a date range. SEQUENCE returns an array of sequential numbers; when combined with a start date, those numbers become sequential dates. The formula instantly spills as many rows (or columns) as required, automatically expanding or contracting when the start or end date changes—ideal for dashboards and templates.

Excel syntax:

=SEQUENCE(end_date - start_date + 1, 1, start_date, 1)

Parameters:

  • rows – calculated as (end_date – start_date + 1) so you include both endpoints.
  • columns – usually 1 for vertical lists; set to another number for horizontal spill.
  • start – your first date.
  • step – 1 to increment by one day (or 7 for weekly, etc.).

When should you use alternatives?

  • Older Excel versions (pre-2021) that lack SEQUENCE require helper functions like ROW/INDEX or the Fill Handle.
  • Business-day ranges may need WORKDAY or WORKDAY.INTL combined with FILTER.
    Prerequisites: start_date and end_date must be valid Excel serial dates, and end_date must be on or after start_date. Internally, Excel stores dates as integers, so subtracting two dates yields the day count that powers the array.

Alternative quick approach (older Excel, no dynamic arrays)

=IF(ROW(A1)-1 <= $B$2 - $B$1, $B$1 + ROW(A1)-1, "")

Drag this formula downward until blank cells appear; it simulates SEQUENCE by using ROW to count increments.

Parameters and Inputs

  • start_date (required): Any valid Excel date, e.g., 04-Jul-2024. Can be a direct entry, cell reference, or output of DATE, TODAY, or other functions.
  • end_date (required): A valid date that is on or after start_date. If it precedes start_date, formulas return errors or negative counts. Validate with a simple comparison or data validation rule.
  • increment (optional): The step between generated dates. Default is 1 (daily). Use 7 for weekly calendars, 30 or 31 for monthly approximations, or negative numbers to build descending lists.
  • array orientation (optional): Rows vs. columns. In SEQUENCE, give rows and columns arguments accordingly.
    Data preparation: Ensure both dates are stored as dates, not text. Apply a date format or test with `=ISNUMBER(`cell). Edge cases:
  • Same start and end date returns a single value.
  • Blank input cells produce #VALUE!, so wrap formulas in IF or LET to trap missing entries.
  • Non-date values (e.g., “April”) yield #VALUE! errors—instruct users to stick to date formats or use DATEVALUE.
    Validation rules: disallow end_date earlier than start_date, restrict entry to allowable calendar windows, and set default increments to positive integers unless a descending list is purposely needed.

Step-by-Step Examples

Example 1: Basic Scenario

Suppose a small team wants a one-page checklist for a training session running from 01-Aug-2024 to 05-Aug-2024.

  1. In [B2] type Start Date; in [C2] type End Date.
  2. Enter 01-Aug-2024 in [B3] and 05-Aug-2024 in [C3].
  3. In [E3] (output header) type Session Dates.
  4. In [E4] enter:
=SEQUENCE($C$3 - $B$3 + 1, 1, $B$3, 1)
  1. Press Enter. Excel spills the dates into [E4:E8]. Each cell shows 01-Aug-2024, 02-Aug-2024 … 05-Aug-2024.
  2. Apply a custom date format (e.g., ddd dd-mmm) to display “Thu 01-Aug”.
  3. Test dynamic behavior: change [C3] to 12-Aug-2024. The spill automatically extends to [E4:E15]—no manual fills.

Why it works: SEQUENCE calculates the days between boundaries (inclusive). Because dates are serial numbers, adding N to start_date shifts N days forward. Variations:

  • Make the list horizontal by flipping rows and columns (change second argument to desired column count).
  • Generate every second day by setting step to 2.
    Troubleshooting: If the output shows numbers (45220) instead of formatted dates, apply a date number format. If only one date appears, verify that end_date ≥ start_date.

Example 2: Real-World Application

A manufacturing planner must allocate machine maintenance on every business day between 15-Sep-2024 and 30-Sep-2024, excluding company-specific holidays in [H2:H4].

  1. Store start_date (15-Sep-2024) in [B6] and end_date (30-Sep-2024) in [C6].
  2. List holidays—20-Sep-2024, 23-Sep-2024, 27-Sep-2024—in [H2:H4].
  3. In [E6] label Maintenance Days.
  4. Use a LET-based formula that combines SEQUENCE with FILTER:
=LET(
    s, $B$6,
    e, $C$6,
    seq, SEQUENCE(e - s + 1, 1, s, 1),
    work, FILTER(seq, (WEEKDAY(seq, 2) <= 5) * (COUNTIF($H$2:$H$4, seq) = 0)),
    work)

Explanation:

  • WEEKDAY(seq,2) ≤ 5 keeps Monday–Friday.
  • COUNTIF(holiday_range, seq)=0 removes holiday matches.
    The result spills only the valid business dates: 16-Sep, 17-Sep, 18-Sep, 19-Sep, 24-Sep, 25-Sep, 26-Sep, 30-Sep.
    Benefits: This directly feeds pivot tables tracking maintenance hours. If leadership shifts the end date or adds a holiday, the list recalculates instantly. Performance: Because LET stores intermediate variables, Excel evaluates SEQUENCE only once, improving speed for longer ranges (thousands of rows).

Example 3: Advanced Technique

A data scientist needs a reverse-ordered, month-end-only list between two dates for back-testing trading strategies: start_date 31-Dec-2019, end_date 31-Mar-2024.

  1. Enter start_date in [B10], end_date in [C10].
  2. In [E10] label Month Ends (Descending).
  3. Use:
=LET(
    s, $B$10,
    e, $C$10,
    months, DATEDIF(s, e, "m"),
    seq, SEQUENCE(months + 1, 1, 0, 1),
    month_end, EOMONTH(e, -seq),
    SORT(month_end, , -1))

Walk-through:

  • DATEDIF counts complete months between s and e.
  • SEQUENCE creates index [0,1,2,…].
  • EOMONTH(e, -k) walks backward to each month end.
  • SORT with order −1 ensures descending output without manual reverse sorting.
    Edge cases: If s is not a month-end, adjust logic to add EOMONTH(s,0) first. Performance: Even for a 30-year span, this runs instantly thanks to array processing. Use this result to feed INDEX-MATCH lookups, chart axes, or Monte Carlo simulations.

Tips and Best Practices

  1. Use absolute references for boundary dates ($B$3) so you can copy formulas across worksheets without breaking links.
  2. Name your boundary cells (e.g., nmStart, nmEnd) to improve readability and eliminate dollar signs.
  3. Apply dynamic formatting such as conditional formatting to shade weekends, making calendars easier to scan.
  4. Store holiday lists in a central table and reference them with structured names (TableHolidays[Date]) so every date range in the workbook follows the same exclusions.
  5. Leverage LET for large ranges to avoid recalculating complex expressions and to self-document formulas.
  6. Combine with spill-friendly functions like UNIQUE, SORT, or XLOOKUP for advanced pipelines without helper columns.

Common Mistakes to Avoid

  1. End date earlier than start date – This yields negative counts or empty arrays. Add data validation or IF(end < start, \"Error\") logic.
  2. Treating text as dates – If users type “7/15” with surrounding quotes, Excel sees text, not a serial number. Wrap with DATEVALUE or enforce date-only formats.
  3. Forgetting to add 1 – SEQUENCE(e – s + 1) is inclusive; omitting the +1 drops the end date.
  4. Hard-coding range sizes – Drag-fill formulas that expect a fixed length break when boundaries grow. Use dynamic arrays or tables instead of static copy-downs.
  5. Not anchoring holiday ranges – COUNTIF unanchored references can shift while filling formulas, leading to missing exclusions. Use absolute references or structured table names.

Alternative Methods

| Method | Excel Version | Dynamic? | Complexity | Pros | Cons | | (SEQUENCE) | 365/2021 | Yes | Low | One formula, spills automatically | Requires modern Excel | | Fill Handle | All | Semi | Very low | Quick for small lists, no formulas | Manual, error-prone, not dynamic | | ROW/INDEX formula | 2010+ | Limited | Moderate | Works without dynamic arrays | Needs drag-fill, extra blanks | | VBA macro | All | Yes | High | Generates huge lists instantly, fully customizable | Requires macro permissions, maintenance | | Power Query | 2016+ | Yes | Moderate | Great for ETL workflows, can load to tables automatically | Separate editor, not live in worksheet |

When to choose each:

  • SEQUENCE for most daily work in modern Excel.
  • Fill Handle for ad-hoc lists less than 20 rows.
  • ROW/INDEX in shared files where colleagues still use Excel 2016 or earlier.
  • VBA when generating millions of rows beyond worksheet limits for exports.
  • Power Query for data models where date dimension tables feed Power Pivot.

Migration strategy: you can replace static drag-filled lists by selecting the first cell, pressing Ctrl+L (Convert to Table) and pointing model queries to that table. Later, swap the manual table with a SEQUENCE spill range named identically—no report redesign required.

FAQ

When should I use this approach?

Use a formula-based date range whenever the boundaries might change or the list feeds downstream calculations. If your start/end dates are parameters in dashboards, a dynamic function like SEQUENCE is essential.

Can this work across multiple sheets?

Yes. Place the boundary dates on a Parameters sheet, name them nmStart and nmEnd, then on any sheet use `=SEQUENCE(`nmEnd – nmStart + 1,1,nmStart,1). Spill ranges cannot cross sheets, but they can feed functions on other sheets via references, e.g., `=SUM(`Parameters!A2#).

What are the limitations?

Spill ranges cannot overlap existing data; Excel returns a #SPILL! error if space is blocked. Pre-2021 Excel lacks SEQUENCE, requiring alternate formulas or VBA. Also, worksheet row limits (1,048,576) cap daily lists at roughly 2,872 years—fine for business use.

How do I handle errors?

Wrap formulas in IFERROR or custom validation. Example: `=IFERROR(`SEQUENCE(...),\"Check dates\"). For #SPILL! errors, clear obstructing cells or switch to an adjacent column.

Does this work in older Excel versions?

SEQUENCE requires 2021 or Microsoft 365. For Excel 2019, 2016, or 2013, use a ROW/INDEX drag-down pattern or a VBA routine. Office Online supports SEQUENCE if your tenant is on the current channel.

What about performance with large datasets?

Dynamic arrays are optimized in the calc engine and handle tens of thousands of dates effortlessly. For hundreds of thousands, LET reduces overhead. Avoid volatile functions like TODAY inside massive loops; calculate them once in a helper cell and reference that cell instead.

Conclusion

Creating a date range from two dates is a cornerstone skill that simplifies scheduling, planning, and analysis. By mastering SEQUENCE and its older-version alternatives, you gain a fast, error-free way to build calendars, feed dashboards, and drive time-based calculations. This knowledge dovetails with dynamic arrays, conditional formatting, and Power Query, strengthening your overall Excel proficiency. Experiment with the examples above, adapt them to your real projects, and you will save hours while producing more reliable workbooks.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.