Before the database purists start typing angry comments, Phillips readily concedes the obvious: Excel is not a relational database. Still, for a personal recipe collection, a properly structured spreadsheet handles the job cleanly without monthly fees or feature creep. Better yet, the architecture showcases just how far modern Excel's dynamic array engine has come, condensing what used to require sprawling helper columns or clunky macros into a single self-updating formula.
Why a Normalized Recipe Table Beats One-Row Shortcuts
Every reliable Excel automation lives or dies by how its source data is arranged, and this meal planner starts with a dedicated worksheet housing an Excel Table named tblRecipes. Rather than cramming an entire dish onto a single horizontal row—Recipe Name followed by Ingredient 1, Quantity 1, Ingredient 2, Quantity 2—the table uses four strict columns:
- Recipe Name
- Ingredient
- Quantity
- Unit
In this layout, every ingredient occupies its own row. That means a dish like Spaghetti and Meat Sauce appears multiple times in the Recipe Name column: once for spaghetti, once for ground beef, once for marinara sauce, and so on. Entering recipes up front takes a little patience, Phillips notes, because you are typing out individual lines rather than pasting a paragraph. The payoff is that once a meal is logged, you never have to touch the underlying table again unless you want to tweak a measurement or add a new favorite.
Data hygiene matters enormously here. Excel groups and sums ingredients by exact text strings, so entering "Tomatoes" in one recipe and "Fresh Tomatoes" in another will split them into two separate lines on your grocery run. The same discipline applies to units of measure: mixing "oz" and "g" for the same ingredient will quietly corrupt your totals, a trap worth preventing with a quick consistency pass while building the table.
Before leaving the Recipes worksheet, the setup requires one small helper formula placed in an empty area outside the table—starting in cell F2 in Phillips's layout:
=SORT(UNIQUE(tblRecipes[Recipe Name]))
Pairing SORT with UNIQUE pulls an alphabetized list of distinct dish names straight from tblRecipes. Because the formula uses structured table references inside a dynamic array, adding a new recipe automatically expands the table and updates the spilled list. One key rule from Microsoft's dynamic array guidelines applies here: never place a spilled formula inside an Excel Table itself, and leave plenty of blank cells underneath F2 so Excel does not throw a #SPILL! error.
- Section takeaway: Storing one ingredient per row inside a four-column Excel Table turns messy recipe text into structured records that a single dynamic helper list can track automatically.
Building the Drop-Down Meal Grid With the Spilled Range Operator
With the recipe database in place, the Meal Plan worksheet stays refreshingly simple: days of the week run across the columns, meal slots (such as breakfast, lunch, dinner, and snacks) run down the rows, and every planning cell gets a drop-down menu via Excel's Data Validation (Data > Data Validation > List).
Instead of pointing Data Validation at a static cell range like $F$2:$F$25—which inevitably breaks the moment you add recipe number 26—the validation source points to the spilled range operator (#):
=Recipes!$F$2#
As Microsoft Support explains, appending # tells Excel to reference the entire dynamic array spilling out of cell F2, regardless of how tall it grows or shrinks,. Add a new stir-fry to tblRecipes, and the helper list re-sorts itself while every meal drop-down across the weekly grid updates instantaneously—no Name Manager gymnastics or manual range edits required.
There is one architectural detail worth keeping in mind if you ever feel tempted to split your recipe book and meal grid into separate files. Microsoft notes that dynamic array formulas and the spilled range operator have limited cross-workbook support: linked formulas work only while both workbooks are open, and refreshing them with the source workbook closed produces #REF! errors,. Keeping Recipes, Meal Plan, and the shopping list inside a single workbook avoids that headache entirely.
- Section takeaway: Pointing Data Validation at
=Recipes!$F$2#creates self-maintaining drop-down menus across your weekly grid, provided all sheets stay inside one self-contained workbook.
Inside the One-Cell LET Shopping-List Formula
Anyone who has ever opened six browser tabs and scribbled down overlapping ingredients on the back of an envelope knows that picking meals is the easy part; consolidating the grocery run is the real chore. Phillips's first prototype tackled the shopping list with three separate formulas—one to sort unique ingredients, one using SUMPRODUCT to calculate totals, and a third using XLOOKUP to pull units—which worked but left unused pantry items cluttering the output with 0 quantities.
To clean that up, he consolidated the entire shopping list into one LET formula:
=LET(
Ingredients,SORT(UNIQUE(tblRecipes[Ingredient])),
Totals,MAP(
Ingredients,
LAMBDA(i,SUMPRODUCT(
(tblRecipes[Ingredient]=i)*
tblRecipes[Quantity]*
COUNTIF('Meal Plan'!$B$2:$H$5,tblRecipes[Recipe Name])))),
Units,MAP(
Ingredients,
LAMBDA(i,XLOOKUP(i,tblRecipes[Ingredient],tblRecipes[Unit],""))),
FILTER(HSTACK(Ingredients,Totals,Units),Totals>0))
At first glance, that block looks intimidating, like someone accidentally pasted Python into a spreadsheet. Under the hood, though, it reads cleanly from top to bottom once you break down each component:
| Component | Role in the Formula | Why It Matters |
|---|---|---|
LET | Assigns friendly names (Ingredients, Totals, Units) to intermediate arrays | Keeps logic in one cell and prevents Excel from recalculating identical expressions repeatedly |
SORT(UNIQUE(...)) | Generates an alphabetical list of every distinct ingredient in tblRecipes | Ensures each item is evaluated once |
MAP + LAMBDA | Steps through Ingredients row by row, passing each item as i | Enables custom per-item array logic without VBA, macros, or JavaScript |
SUMPRODUCT + COUNTIF | Counts how many times each recipe appears in 'Meal Plan'!$B$2:$H$5 and multiplies by ingredient quantity | Automatically doubles or triples ingredient amounts if you schedule a dish multiple times in one week |
XLOOKUP | Matches ingredient i against tblRecipes[Ingredient] and returns its Unit | Replaces VLOOKUP with exact-match-by-default lookups and clean fallback handling ("") |
HSTACK | Appends Ingredients, Totals, and Units side by side, | Combines three parallel vertical arrays into a single three-column table |
FILTER(..., Totals>0) | Keeps only rows where the calculated weekly total exceeds zero | Strips out every ingredient from recipes you did not select this week |
If you pick Taco Tuesday twice in the same week, COUNTIF returns 2 for every row belonging to that recipe in tblRecipes, SUMPRODUCT scales the quantities accordingly, and FILTER drops everything sitting at zero. Change one drop-down on the planner, and the entire three-column grocery list recalculates live.
- Section takeaway: Combining
LET,MAP,LAMBDA,HSTACK, andFILTERturns three scattered formulas into a single dynamic array that scales quantities by weekly meal counts and hides unused ingredients.
Compatibility Check: Which Excel Versions Actually Run This?
Before you spend twenty minutes entering your favorite recipes only to be greeted by #NAME? errors, check which version of Excel is installed on your PC or Mac. While UNIQUE, SORT, FILTER, XLOOKUP, and LET have been around since Excel 2021, this workbook's all-in-one formula relies on newer array-shaping functions that draw a firmer compatibility line.
| Excel Edition | UNIQUE / SORT / FILTER / XLOOKUP / LET | MAP & HSTACK | Full Workbook Compatibility |
|---|---|---|---|
| Microsoft 365 (Windows, Mac, Web) | Supported | Supported | Yes |
| Excel 2024 (Windows, Mac) | Supported | Supported, | Yes |
| Excel for the web | Supported | Supported | Yes |
| Excel 2021 | Supported | Not supported | No (requires split helper columns instead) |
| Excel 2016 / Excel 2019 | Not supported (XLOOKUP and dynamic arrays absent) | Not supported | No |
According to Microsoft Support documentation, HSTACK and MAP are supported in Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel for the web, Excel 2024, and Excel 2024 for Mac. If you are running a perpetual license of Excel 2021, you can still replicate the general idea using separate spilled columns for SORT(UNIQUE(...)), SUMPRODUCT, and XLOOKUP without MAP or HSTACK—you simply lose the tidy one-cell packaging.
- Section takeaway: Recreating the single-formula shopping list as written requires Microsoft 365, Excel 2024, or Excel for the web because
MAPandHSTACKare absent from Excel 2021 and older perpetual releases.
Five Practical Guardrails and Troubleshooting Fixes Before You Shop
Every clever spreadsheet has edges you only discover on Sunday morning when you clear last week's grid and start fresh. Before putting this workbook into weekly rotation, keep five practical realities and formula safeguards in mind:
- Prevent the Empty-Week
#CALC!Error: Notice that the submittedFILTER(HSTACK(Ingredients,Totals,Units),Totals>0)formula omitsFILTER's optional third[if_empty]argument. Microsoft Support warns that if aFILTERformula returns zero matching rows—exactly what happens when you clear every drop-down in'Meal Plan'!$B$2:$H$5—Excel throws a#CALC!("Empty array") error because it cannot spill an empty set,. Adding a fallback string fixes it immediately:
FILTER(HSTACK(Ingredients,Totals,Units),Totals>0,"No meals selected")
, - Respect
XLOOKUP's First-Match Rule on Units: BecauseXLOOKUPreturns the unit from the first matching ingredient row it finds intblRecipes, mixed units create silent math errors. If one recipe asks for2cupsof flour and another asks for250gramsof flour,SUMPRODUCTwill dutifully add2 + 250to get252, andXLOOKUPwill label the whole pilecups. Standardize every shared ingredient to a single unit up front. - Update the Fixed Planner Range if Your Grid Grows: The
COUNTIFexpression hardcodes'Meal Plan'!$B$2:$H$5, which fits seven days across four meal rows. If you add extra rows for desserts or snacks—or expand to a two-week planner—update$B$2:$H$5insideCOUNTIFso those cells are not ignored. - Keep Spill Areas Clear: Both the recipe helper list (
F2#) and the final shopping list need unobstructed blank cells beneath them (and three clear columns wide for the shopping list). Putting notes, totals, or borders with values directly underneath will trigger a#SPILL!blockage. - Treat Output as Raw Recipe Math, Not a Purchase Order: As Phillips emphasizes, the workbook does not track pantry inventory, adjust serving counts, or round up to supermarket package sizes. If the sheet tells you that you need
3.9loaves of bread or1cup of brown sugar you already own, common sense in the grocery aisle handles the rest.
That restraint is ultimately why this little workbook succeeds where bloated meal-planning platforms wear users down. It does not pretend to manage your kitchen inventory or curate your diet—it just takes structured recipe data, pairs it with modern Excel dynamic arrays, and hands you an accurate shopping list in seconds. If your routine changes later, the formula is sitting right there in one cell, ready to adapt without waiting on an app developer's roadmap.
References
- I built a meal planner in Excel that writes my shopping list for me How-To Geek · 2026-11-28T12:00:16+00:00
- Apply data validation to cells | Microsoft Support support.microsoft.com
- UNIQUE function | Microsoft Support support.microsoft.com