Sum Rows Matching a Selected Date in Excel
Question details
Sum values from multiple rows or sections that match a date selected in a worksheet cell.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains dates and associated values in multiple rows or sections, and the user selects a date in a cell.
- Observed behavior
- The desired result is a single total of the values associated with the selected date.
Identify the selected-date cell and the ranges containing dates and values. Make sure the dates are stored as Excel dates rather than text, and check whether they include times.
Use SUMIF to total rows with a matching date
Use this method when each date is in a column beside its corresponding value.
Enter or select the target date in cell H9.
Select the cell for the total and enter =SUMIF(A2:A100,H9,B2:B100), where column A contains dates and column B contains the values to sum.
If another section has dates in D2:D100 and values in E2:E100, use =SUMIF(A2:A100,H9,B2:B100)+SUMIF(D2:D100,H9,E2:E100). Adjust the ranges to match your worksheet.

Sum values beneath matching date headers in Microsoft 365
Use a dynamic array formula when each section has dates in its first row and values below those dates.
Calculate date-based totals in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use SUMIF to total values whose date matches a selected cell, including values from multiple sections.
- 1. Open the workbook: In WPS Spreadsheet, choose Open and select your Excel workbook.
- 2. Choose the date: Enter the date to match in cell H9, or use the cell that already contains your selected date.
- 3. Enter SUMIF: Select the result cell and enter =SUMIF(A2:A100,H9,B2:B100), adjusting the date and value ranges to fit your sheet.
- 4. Add other sections: Add another SUMIF to the formula for each separate date and value range, then press Enter.

Frequently Asked Questions
How do I sum values for a date selected in a cell?
If dates are in A2:A100, values are in B2:B100, and the selected date is in H9, enter =SUMIF(A2:A100,H9,B2:B100) in the result cell.
Can I sum matching dates across separate sections?
Yes. Add a SUMIF for each section, such as =SUMIF(A2:A100,H9,B2:B100)+SUMIF(D2:D100,H9,E2:E100).
Why does SUMIF miss dates that include times?
A date with a time has a different underlying value from the date alone. Use =SUMIFS(B2:B100,A2:A100,">="&H9,A2:A100,"<"&H9+1) to include the full day.
How can I sum values when dates are column headers?
In a compatible Microsoft 365 version, use HSTACK to combine sections, FILTER to select columns whose headers match the date, and SUM to total the values beneath them.




