Build a monthly sales report in Excel with formulas
A small sales report that updates itself: totals by month and by product, a best seller and a change on last month. Every formula in order, with checks.
A monthly sales report in Excel is a small block of SUMIFS formulas beside your order list. One SUMIFS per month, one per product. Add a new order and every total changes by itself.
Here is the data. A small pottery sells mugs, bowls and plates online. Each row is one order, from January to March 2027. The list is in A1:D13.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Date | Product | Units | Sales |
| 2 | 4 Jan 2027 | Mugs | 6 | 72 |
| 3 | 11 Jan 2027 | Bowls | 4 | 88 |
| 4 | 19 Jan 2027 | Plates | 10 | 150 |
| 5 | 31 Jan 2027 | Mugs | 3 | 36 |
| 6 | 2 Feb 2027 | Bowls | 5 | 110 |
| 7 | 9 Feb 2027 | Mugs | 8 | 96 |
| 8 | 17 Feb 2027 | Plates | 6 | 90 |
| 9 | 26 Feb 2027 | Bowls | 2 | 44 |
| 10 | 3 Mar 2027 | Mugs | 12 | 144 |
| 11 | 10 Mar 2027 | Plates | 8 | 120 |
| 12 | 15 Mar 2027 | Bowls | 7 | 154 |
| 13 | 22 Mar 2027 | Mugs | 5 | 60 |
The report goes in columns F to H. When it is done, it looks like this. The rest of the article builds it, one formula at a time.
| Row | F | G | H |
|---|---|---|---|
| 1 | Month | Sales | Change |
| 2 | Jan 2027 | 346 | |
| 3 | Feb 2027 | 340 | -1.7% |
| 4 | Mar 2027 | 478 | 40.6% |
| 5 | |||
| 6 | Product | Sales | Share |
| 7 | Mugs | 408 | 35.1% |
| 8 | Bowls | 396 | 34.0% |
| 9 | Plates | 360 | 30.9% |
| 10 | |||
| 11 | Best seller | Mugs | |
| 12 | Top sale in March | 154 |
Step 1: make the ranges long enough
Every formula below reads rows 2 to 500, not rows 2 to 13. The empty rows add nothing. But a new order typed in row 14 is counted at once, with no formula to change.
Lock those ranges with dollar signs. You will fill each formula down, and the data must not move when you do.
Step 2: sales by month
Type the first day of each month in F2:F4. So F2 holds 1 January 2027, and F3 holds 1 February.
Give them the custom format mmm yyyy so they show as Jan 2027.
A real date is better than the text "Jan". SUMIFS can compare a date with a date, but not with a word.
In G2, type:
=SUMIFS($D$2:$D$500,$A$2:$A$500,">="&F2,$A$2:$A$500,"<="&EOMONTH(F2,0))
It gives 346 for January. Fill it down to G4 for 340 in February and 478 in March.
The formula adds column D where the date is from F2 to the last day of that month. EOMONTH(F2,0) gives that last day, so you never type 28, 30
or 31.
Two date ranges that look right and are not
Adding 30 days. Some people write "<="&F3+30
for the end of the month. For February that is 3 March. February's total becomes 484, not 340,
because the 144 sale on 3 March is counted too.
Less than, not less than or equal. Write
"<"&EOMONTH(F2,0) and 31 January is left out. January
falls from 346 to 310, and nothing shows an error.
If your dates also hold a time, use "<"&EOMONTH(F2,0)+1.
A sale at 3 pm on 31 January is later than 31 January itself, which is midnight.
Step 3: sales by product
Type the product names in F7:F9, one per cell. The formula reads the name beside it, so one formula works for every row.
In G7, type =SUMIFS($D$2:$D$500,$B$2:$B$500,F7). It gives 408
for mugs.
Fill it down. Bowls give 396 and plates give 360.
F7 has no dollar signs, on purpose. It must move to F8 and F9 as you fill down. The data ranges must not.
For a share of the total, type =G7/SUM($G$7:$G$9) in H7 and
fill down. Mugs are 0.351, which shows as 35.1% with a percent format. The
percentages article explains the format.
Step 4: the best seller
The best seller is the product next to the biggest total. MAX finds the number, and a lookup finds the name beside it.
In G11, type =XLOOKUP(MAX(G7:G9),G7:G9,F7:F9). It gives Mugs.
In Excel 2019 or older, XLOOKUP is missing. Use
=INDEX(F7:F9,MATCH(MAX(G7:G9),G7:G9,0)) instead. It gives the
same answer.
Mugs win by 12, and a single order could change that. If two products have the same total, both formulas show the first one in the list. Look at the totals, not only the name.
The biggest single order in March is a MAXIFS with the same date test.
=MAXIFS($D$2:$D$500,$A$2:$A$500,">="&F4,$A$2:$A$500,"<="&EOMONTH(F4,0))
gives 154, the bowls on 15 March. MAXIFS needs Excel 2019 or later.
Step 5: the change on last month
In H3, type =(G3-G2)/G2. It gives -0.017, so February is 1.7%
down on January.
Fill it down to H4. March gives 0.406, which is 40.6% up on February.
Leave H2 empty. January has no month before it in this report, and a 0 there would look like "no change".
Be careful with the current month. On 15 March, the March total holds half a month. Compared with a full February, it will look like a bad month. Compare full months only, or say clearly that the month is not over.
Step 6: the checks
A report can be wrong and still look normal. Two formulas tell you if every order was counted exactly once.
=SUM(G2:G4)=SUM(D2:D500) gives TRUE. The 3 months add up to
1164, the same as all the orders.
=SUM(G7:G9)=SUM(D2:D500) gives TRUE as well. The products add
up to the same 1164.
A FALSE means something is missing or counted twice. Look for a product name with a typing error. Or look for an order dated outside the months in F2:F4. Then find it before you send the report.
Put the checks next to the report, not on a hidden sheet. You want to see them every time you open the file.
Adding April
Type 1 April 2027 in F5 and fill G4 down to G5. Fill the change down to H5 as well. Then change both checks to read G2:G5.
That last part is the one people forget. The check still says G2:G4, so it compares 3 months with all the orders. It shows FALSE as soon as April has sales, even though the report is right.
A PivotTable can build the same totals with no formulas. The PivotTable or SUMIFS article compares the two. To practise the SUMIFS shapes on their own first, try the SUMIF and SUMIFS exercises. The lessons below build a report like this on a real sheet you type into. Each answer is checked when you press Enter.