Skip to content

How to build a simple MMM in Excel, step by step

Export weekly sales from Shopify and weekly spend per channel, add a carryover column per channel and run Data Analysis > Regression in Excel. Tune the decay with Solver, test the model on weeks it has not seen, then compare each channel's total return with your break-even ROAS.

By , Founder & CEOUpdated 8 min read

Usually it takes one sheet and two Excel add-ins. Put weekly sales and weekly spend per channel side by side, add a carryover column for each channel, and run the Regression tool. Tune the carryover with Solver, test the model on weeks it has not seen, then compare each channel's return with your break-even ROAS.

Twelve steps: four to collect, four to shape and check, four to fit and judge. The menu paths come from Shopify's, Google's, Meta's and Microsoft's own help pages.

Step by step

  1. Export weekly sales from Shopify. Open the Total sales over time report and set its time unit to week in the configuration panel's Dimensions menu. Export it as a CSV file. Path: Analytics > Reports > Total sales over time > Dimensions > week > Export.
  2. Export weekly Google Ads cost. On the Campaigns page, select the segment icon, then Time, then Week. Use the download icon above the table and pick Excel CSV. Path: Campaigns > segment icon > Time > Week > download icon > Download.
  3. Get weekly Meta spend. In Meta Ads Manager, select your campaigns, click the Breakdown icon, then By time, and choose week. Meta's help describes a maximum 37-month reporting window for ads data, so save the older weeks now. Path: Ads Manager > Breakdown icon > By time > Week.
  4. Line the weeks up in one sheet. One row per week: week start, sales, one spend column per channel, then a 1 or 0 for promotion and holiday weeks. Robyn's guide says to agree up front whether weeks start on Sunday or Monday. In Excel: one sheet, oldest week at the top.
  5. Add a carryover column for each channel. This is geometric adstock: this week's spend plus a share of last week's carryover. Robyn's guide gives digital channels a rule-of-thumb decay of 0 to 0.3. In Excel: type Meta's decay in K1 and name that cell decay_meta in the Name Box. With Meta spend in column C, write =C2 in D2 and =C3+decay_meta*D2 in D3, then fill down.
  6. Bend the line if you want saturation. LINEST fits models that are linear in their parameters, including logarithmic ones. A column of logs lets returns flatten as spend grows, a spreadsheet stand-in for the Hill curve that Robyn and Meridian both use. In Excel: =LN(1+D2) in E2, filled down.
  7. Load the two add-ins. Select File, Options, then Add-ins, pick Excel Add-ins in the Manage box and select Go. Tick Analysis ToolPak and Solver Add-in, then OK. Path: File > Options > Add-ins > Manage: Excel Add-ins > Go.
  8. See which columns move together. Run the Correlation tool on your carryover columns. It returns a correlation matrix, with CORREL applied to every pair of columns. Path: Data > Data Analysis > Correlation.
  9. Run the regression. Pick Regression from the same list, with weekly sales as the dependent range. Use the carryover or log columns plus the promotion and holiday flags as the independent range. Path: Data > Data Analysis > Regression.
  10. Tune the decay with Solver. With sales in B and the columns you model side by side in E to G, put =INDEX(LINEST(B2:B105,E2:G105,TRUE,TRUE),5,2) in a spare cell. It returns ssresid, the residual sum of squares. Set it as Solver's objective, choose Min, list the decay cells under By Changing Variable Cells and keep each between 0 and 1. Path: Data > Analysis group > Solver.
  11. Test it on weeks it has not seen. Refit on all but the last eight weeks, then predict those eight from the coefficients and compare with actual sales. In Excel: the same LINEST over the shorter range, then the intercept plus each coefficient times that week's column.
  12. Compare each channel with break-even. In the straight-line version, one euro of spend returns its coefficient divided by 1 minus the decay, spread over the following weeks. Set that next to 1 divided by your margin. In Excel: =coefficient/(1-decay) beside =1/margin.

A worked example

On one store's Break-even sheet, a 40% margin gives a break-even ROAS of 2.5x, because 1 divided by 0.40 is 2.5. That is break-even arithmetic, not a ROAS this store achieved, and the export holds no spend at all.

For illustration, say a shop fits two years of weeks with two channels and a promotion flag. For illustration, Solver settles Meta's decay at 0.2 and Google's at 0. The Regression tool then returns 2.4 for Meta's carryover column and 2.2 for Google's.

In this illustrative case, Meta's 2.4 read alone sits under the 2.5x bar. Count the carryover and it clears it: 2.4 divided by 1 minus 0.2 is 3.0. Google's 2.2 has no carryover to add, so it stays under the bar.

At a 40% margin, if the straight-line model is right, the next euro of Google spend loses money. That is a big if. A straight line says the next euro returns as much as the average euro did.

Swap in the log columns from step 6 and the return on each extra euro falls as spend grows. Compare that marginal return with 2.5, not the average. Then look at the standard errors: a coefficient that clears the bar by less than its own error has not cleared it.

The Break-even sheet's row is a template, not a target. Put your own margin in, and the bar moves.

What should you check when the coefficients look wrong?

A coefficient of exactly 0 with a standard error of 0. LINEST removed that column as redundant. Two columns carry the same information, so merge them or drop one.

Coefficients in the wrong columns. LINEST returns them right to left: the last independent column comes first and the intercept comes last. Check the order before you copy a coefficient anywhere.

A negative coefficient on a channel. Usually a missing control, such as a sale you ran while you cut spend. Add the flag, or merge two channels that always move together.

A near-perfect fit on few weeks. Too many columns for too few rows. Robyn's guide recommends 1 independent variable per 10 observations.

Solver parks a decay at 0 or 1. The data cannot pin it down. Fix it from Robyn's rule of thumb, write that down, and test the channel instead of trusting its number.

A spike lands on one channel. A sale or a holiday is missing from your flags. Add it and refit.

A week shows sales nobody made that week. Shopify's sales report shows an order edited after its day as a separate order on the edit date. Big edits can shift sales into the wrong row.

What to do this week

  1. Build the sheet and run step 9 once. Use the last two years of weeks and every channel you pay for. Pass: every column gets a coefficient, and none shows 0 with a standard error of 0. Fail: one does, so merge or drop that column before anything else.
  2. Hold out the last eight weeks. Refit without them and predict them, as in the holdout step above. Pass: the predicted line rises and falls with the real weeks. Fail: it misses the turns, so the model describes the past without explaining it.
  3. Put each channel next to break-even. Work out 1 divided by your margin, then each channel's coefficient divided by 1 minus its decay. Pass: a channel clears break-even by more than its standard error. Fail: it clears only on paper, so run a holdout test before adding budget.

Check the homework. Your GA4 Attribution paths export already holds the evidence. Causality Engine reads that one file and shows what each channel caused next to what last-click gave it, in 1 to 2 minutes, for €99 once (excluding VAT), refundable within 30 days. Check the homework

Sources, 1 October 2026: Sales reports (Shopify); Setting and comparing time ranges for your reports (Shopify); Exporting reports (Shopify); Use segments in your tables (Google); Create, save, and schedule reports from your statistics tables (Google); Navigate to breakdowns in Meta Ads Manager (Meta); About breakdowns, metrics and filtering in Meta Ads Reporting (Meta); About metrics being removed (Meta); An Analyst's Guide to MMM (Meta); Media saturation and lagging (Google); LINEST function (Microsoft); Load the Analysis ToolPak in Excel (Microsoft); Use the Analysis ToolPak to perform complex data analysis (Microsoft); Define and use names in formulas (Microsoft); Load the Solver Add-in in Excel (Microsoft); Define and solve a problem by using Solver (Microsoft)

Frequently asked questions

  • Why did Excel give one channel a coefficient of exactly zero?
    Because LINEST dropped it. Excel's help page says LINEST removes redundant columns and shows each with a 0 coefficient and a 0 standard error. Two of your columns carry the same information, often two channels whose spend moved in lockstep. Merge them or drop one.
  • Should I use the Regression tool or the LINEST function?
    Use the Regression tool for a readable output table. Use LINEST when Solver has to refit the model while it changes the decay, because a formula recalculates when its inputs change. Both run the same least-squares fit underneath.
  • Should an Excel MMM use daily or weekly rows?
    Weekly, if you have two years or more. Robyn's guide recommends daily data only for a short window, such as the most recent six months, because weekly rows would be too sparse. Whichever you pick, line up every export on the same days.

Go deeper: Causal attribution, explained.

Sixty-second versions of these ideas: Causality Engine on YouTube Shorts.

Keep reading

Terms in this article

Browse the full glossary

Your platforms guess.
We run the math.

Upload a GA4 export and see what each channel caused, next to last-click, in 1–2 minutes. The read is yours to keep.

Free, in your browser: your file is not uploaded. The full read is €99, refundable within 30 days. Prices exclude VAT.
Or book a 30-min call.