Share via

When I filter on Column A - Project ID I want a subtotal of the dates in Column D - Start Date based on a date range

Terri 0 Reputation points
2026-03-17T19:17:36.53+00:00

When I filter on Column A - "Project ID" I want a subtotal of the dates in Column D - "Start Date" based on the date range in D1 & D2

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-17T19:17:47.8566667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Use a SUBTOTAL formula that refers to the filtered Start Date range and your date limits in D1 and D2.

    Assume:

    • Column A = Project ID (filtered with AutoFilter)
    • Column D = Start Date (data starts in row 3)
    • D1 = Start of date range
    • D2 = End of date range
    1. Turn the range into a proper list and apply filters (Data → Filter) on Project ID.
    2. In any empty cell, enter a formula like:
    =SUBTOTAL(9, FILTER(D3:D100, (D3:D100>=D1)*(D3:D100<=D2)))
    

    Explanation based on context:

    • SUBTOTAL(9, …) uses function number 9 = SUM on the visible (filtered) cells only.
    • The inner range D3:D100 is the Start Date column.
    • The FILTER condition (D3:D100>=D1)*(D3:D100<=D2) restricts the dates to the range in D1–D2.
    • When Project ID in column A is filtered, only visible rows are considered by SUBTOTAL.

    If FILTER is not available, first insert subtotals by Project ID (Data → Subtotal) and then use SUBTOTAL directly on the Start Date column, adjusting the date range manually or via helper columns.


    References: