Calculation Issues

Sum Rows Matching a Selected Date in Excel

Natalie TaylorNatalie Taylor Nov 18, 2026 868 views

Question details

Sum values from multiple rows or sections that match a date selected in a worksheet cell.

How to Sum Rows Matching a Selected Date in Excel
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.
Before you start

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.

Solution 1Recommended

Use SUMIF to total rows with a matching date

Use this method when each date is in a column beside its corresponding value.

1
Select the date

Enter or select the target date in cell H9.

2
Enter the formula

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.

3
Include separate sections

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.

Use SUMIF to total rows with a matching date
Dates with times: If date cells include times, use =SUMIFS(B2:B100,A2:A100,">="&H9,A2:A100,"<"&H9+1) to include all times on the date in H9. Add another SUMIFS for each separate section.
Sum dates in WPS Spreadsheet

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. 1. Open the workbook: In WPS Spreadsheet, choose Open and select your Excel workbook.
  2. 2. Choose the date: Enter the date to match in cell H9, or use the cell that already contains your selected date.
  3. 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. 4. Add other sections: Add another SUMIF to the formula for each separate date and value range, then press Enter.
Sum matching dates with a familiar SUMIF formulaOpen and edit Microsoft Excel XLSX and XLS filesAdd separate section totals in one formulaUse a familiar spreadsheet interface
QA img-9

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.