Excel Formula Generator tutorial: filling and checking the 16 skeletons

Open Tool Excel Formula Generator

When to use it

I reach for this tool on three kinds of work.

The first is a monthly roll-up. A dozen stores sit in one sheet and I need totals by region. The argument order for SUMIF and SUMIFS only comes back to me while typing.

The second is a cross-sheet fetch. Order numbers live in the main sheet, amounts in another one. Whether VLOOKUP or INDEX with MATCH is the right pick depends on whether the return column sits left or right of the lookup column.

The third is cleaning strings such as employee codes and addresses. Taking the left few characters, or splitting on a slash and grabbing segment N, is easy enough to write and easy enough to get wrong by leaving TRIM out.

The pattern is the same every time. I know what to compute. I cannot reliably recall the syntax. The tool supplies the syntax. It does not decide the business question, and it will not pick between a sum and an average for you.

Parameters

Six inputs plus one switch.

Data range: a column letter with both row numbers, such as B2:B200. The row count must match the table being tested. I learned this the hard way once, with a criteria range ending at row 200 and a sum range ending at row 100. Excel raised no error. It simply returned half the total.

Criteria: wrap text in double quotes, as in "East". Put comparison operators inside the quotes, as in ">=500". Typing >500 without quotes makes Excel compare text, and the test comes back false every time.

Return or sum range: the column that actually takes part in the maths. In VLOOKUP this doubles as the search range, and the column index counts from its first column.

Lookup value: one cell or a constant. Constant text needs double quotes too.

Second criterion: only the multi-condition skeletons use it. SUMIFS and the two-key fetch each take one.

Text parameter N: which column, which character, or which multiple. Positive integers only.

Absolute reference switch: turn it on and B2:B6 becomes $B$2:$B$6, so a drag-fill will not drift. Whole-column forms such as A:A never get dollar signs.

The 16 skeletons fall into four families: four for aggregation, four for lookup, four for text, four for logic and dates. Choosing a family filters the dropdown. Choosing All shows the complete set.

Steps

  1. Click a family chip under Formula scenario, or leave All selected.
  2. Open the skeleton dropdown and pick one. A hint line below says when it fits, for example that SUMIF adds one column under a single condition.
  3. Fill the data range. This is the field people get wrong most often, so always give both row numbers.
  4. Fill the criteria. Text goes in quotes, operators go inside the quotes.
  5. Fill the return range, lookup value, second criterion and text parameter N as the skeleton dictates. Leave the rest empty.
  6. Tick absolute references when the formula will be dragged down a column.
  7. Press Build formula, then read the formula block, the argument notes and the seven checks. Press Copy formula to take it into a cell, or Download notes to keep the whole thing.

Any edit recomputes on the spot. There is no second button to press for the same change.

Reading the result

Here is my own run through the tool. B2:B6 holds regions in order: East, South, East, North, East. D2:D6 holds amounts: 12000, 9800, 21000, 15600, 15300.

Choose single-condition sum, set the data range to B2:B6, the criteria to "East", the sum range to D2:D6, and tick absolute references. The output is:

=SUMIF($B$2:$B$6,"East",$D$2:$D$6)

Work it out by hand on my own numbers. The East rows are 12000, 21000 and 15300, which total 48300. South at 9800 and North at 15600 stay out. The answer is 48,300, not the grand total of 76,100.

The explanation panel has four rows. The first says what SUMIF is for. The next three map the data range, the criteria and the sum range onto their positions in the formula, with the placeholder name shown on the left of each row.

Seven checks run underneath. For this formula: brackets come to one matching pair and pass; two double quotes make a pair and pass; the only function is SUMIF, which sits inside the supported list of 55 and passes; punctuation is half-width and passes; no semicolons and passes; no whole-column references and passes; no leftover placeholders and passes. Seven green dots.

Now change the criteria to "East (direct)". Those brackets are full-width, so the check reports a punctuation problem and rewrites the formula brackets to half-width.

Now write the data range as B:B. The check does not block it, but it raises an amber line: a whole-column reference slows the workbook, use B2:B5000 instead.

Questions

Q: I pasted the formula and got #NAME?. What happened?

A: Almost always a version gate. TEXTJOIN needs Excel 2019 or later and XLOOKUP needs Excel 365. Older builds have no such function, so the error is the version, not your typing.

Q: The total is off by a few hundred. Where do I look first?

A: I suggest comparing the row count of the criteria range against the sum range. When they disagree, Excel still returns a number, just the wrong one.

Q: Why did my Chinese comma get replaced?

A: Excel only accepts half-width commas. A full-width comma turns the whole line into text, so the tool normalises it up front and the checker tests for it specifically.

Q: I ticked absolute references but A2 stayed as A2. Why?

A: The switch only touches A1:B2 style ranges. Single cells and whole-column references are left alone. Type $A$2 yourself when one cell must stay pinned.

Limits

It does not open a workbook. It does not read a single cell. It does not evaluate the formula against your real data. What it guarantees is valid syntax and correct argument placement.

Logic errors stay invisible. Misaligned ranges, inconsistent criteria definitions and hidden spaces inside text all have to be caught in Excel against a sample of rows.

Fifty-five functions are on the supported list. Anything outside it still generates, but the check flags the name as unknown, LAMBDA and its relatives included.

History holds six entries in this browser. A different browser or a cleared cache takes them away.

Interface language follows the site, with no switch inside the plugin. The formula text is byte-identical across the three languages; only the explanation language changes.

⏫︎