# How to sum values for the most recent date in Excel

Use MAX to find the latest date and SUMIFS to add its rows: `=SUMIFS(C2:C9,A2:A9,MAX(A2:A9))`.

**Excel:** `=SUMIFS(C2:C9,A2:A9,MAX(A2:A9))` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Date | Store | Units sold |  | Latest day |
| 2026-06-08 | Downtown | 142 |  |  |
| 2026-06-08 | Airport | 96 |  |  |
| 2026-06-09 | Downtown | 158 |  |  |
| 2026-06-09 | Airport | 104 |  |  |
| 2026-06-09 | Mall | 87 |  |  |
| 2026-06-10 | Downtown | 135 |  |  |
| 2026-06-10 | Airport | 112 |  |  |
| 2026-06-10 | Mall | 91 |  |  |

Formula in F1: `=SUMIFS(C2:C9,A2:A9,MAX(A2:A9))`

Result: 338

## How it works

Dates are numbers, so `MAX(A2:A9)` is the latest date: June 10. SUMIFS then adds the units on every row with exactly that date, across all stores. When the next day's rows are added, the total moves to the new date by itself.

## Other ways

- `=SUMPRODUCT((A2:A9=MAX(A2:A9))*C2:C9)`: The same test as an array; easy to combine with a store condition.

## Common mistakes

- If the dates include times, each row has a different value and MAX matches only one row. Compare whole days with `INT(A2:A9)=INT(MAX(A2:A9))` in SUMPRODUCT.
- Text that looks like a date is ignored by MAX. Make sure the column holds real dates.

## Questions

**How do I sum the latest date for one store?**

Use MAXIFS for that store's latest date: `=SUMIFS(C2:C9,B2:B9,"Mall",A2:A9,MAXIFS(A2:A9,B2:B9,"Mall"))`.

**How do I sum the previous day?**

Find the largest date before the latest: `=SUMIFS(C2:C9,A2:A9,MAXIFS(A2:A9,A2:A9,"<"&MAX(A2:A9)))`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/sum-values-for-the-most-recent-date
