Skip to tool
ecech.
✏️ Text & SEO Content

Excel Formula Builder That Writes the Exact-Match Argument You Keep Forgetting

VLOOKUP defaults to approximate match and returns the wrong row when data is unsorted. This always writes the exact-match flag, and offers XLOOKUP, which has no such trap.

Formula







What each part means

Advertisement

How the calculation works

The VLOOKUP argument everyone forgets Left it off =VLOOKUP(id, A:D, 2) defaults to approximate match wrong row if data is unsorted no error — just a wrong number Wrote it =VLOOKUP(id, A:D, 2, FALSE) FALSE forces exact match right row, or #N/A if truly absent a visible #N/A beats a silent wrong answer This builder always writes FALSE, and suggests XLOOKUP, which is exact by default.

How to Use This Tool

Pick the task, fill in the cells, and copy a formula that already has the correct arguments — including the ones spreadsheets treat as optional but rarely should be.

The VLOOKUP trap this avoids

VLOOKUP takes an optional fourth argument. Leave it off and it defaults to approximate match, which assumes your lookup column is sorted ascending and returns the closest value at or below your target. On unsorted data that is simply the wrong row, returned with no error. It is one of the most common spreadsheet bugs precisely because nothing flags it — the number looks plausible.

The fix is the literal FALSE (or 0) as the fourth argument, forcing exact match. This builder always writes it. If the value genuinely is not there you get #N/A, which is the honest answer and far easier to spot than a wrong number that blends in.

Why XLOOKUP is offered instead

Where your spreadsheet supports it — Excel 365 and current Google Sheets — XLOOKUP is the better tool, and the builder shows it alongside. It is exact-match by default, so the trap above cannot happen. It can look to the left of the key, which VLOOKUP cannot. It takes a built-in "if not found" argument, so you skip wrapping the whole thing in IFERROR. And it references the return column directly, so inserting a column does not silently break it the way VLOOKUP's numeric index does.

Why VLOOKUP breaks when you insert a column =VLOOKUP(id, A:D, 3, FALSE) the 3 means "third column" Insert a column and the data you wanted is now the fourth. The 3 still says third, so it returns the wrong column — silently, again. XLOOKUP names the return range, so it moves with the data.
A numeric column index is a hard-coded position; a referenced range is not.

The comma-versus-semicolon problem

If you paste a formula from an English tutorial and Excel rejects it, the separator is usually why. In locales where the comma is the decimal mark — much of Europe — Excel uses a semicolon to separate arguments instead. The formula is otherwise identical. The separator toggle at the top writes whichever your copy of Excel expects. Google Sheets uses commas regardless of locale, so pick comma for Sheets.

What a builder cannot check

It writes correct syntax, not a correct answer. It cannot see your sheet, so it cannot know whether your ranges line up, whether a lookup column actually contains the key, or whether a date cell holds a real date or text that merely looks like one — a frequent cause of formulas that return nothing. Treat the output as a correctly-formed starting point, adjust the cell references to your layout, and if a result looks wrong, check the data types first.

Advertisement

Frequently Asked Questions

Why does my VLOOKUP return the wrong value?
Almost always because the fourth argument was left off, so it defaulted to approximate match. That mode assumes the lookup column is sorted ascending and returns the nearest value at or below your target, which on unsorted data is simply a wrong row — with no error. Adding FALSE as the fourth argument forces exact match, which this builder always does.
Should I use VLOOKUP or XLOOKUP?
XLOOKUP where your spreadsheet supports it — Excel 365 and current Google Sheets. It is exact-match by default so the classic trap cannot happen, it can look left of the key, it has a built-in not-found value, and it references the return column directly so inserting a column does not break it. VLOOKUP is only better when you need compatibility with older Excel.
Why does Excel reject a formula that worked in a tutorial?
Usually the argument separator. In locales where the comma is the decimal mark, Excel separates arguments with a semicolon instead. A formula written with commas fails there and vice versa. The formula is otherwise identical; switch the separator to match your Excel. Google Sheets uses commas regardless of locale.
What is the difference between SUMIF and SUMIFS?
SUMIF applies a single condition; SUMIFS applies several, and its argument order is different — the sum range comes first in SUMIFS and last in SUMIF, which is a common source of errors. If there is any chance you will add a second condition later, using SUMIFS from the start avoids rewriting.
Why does my formula return #N/A?
For a lookup, #N/A means the key was not found in the lookup column with an exact match. Often the values differ invisibly — trailing spaces, a number stored as text versus a real number, or different capitalisation in a case-sensitive context. It is the honest result; wrap the formula in IFERROR or use XLOOKUP's not-found argument to show a friendlier message.
Can this write any formula I describe?
No, and that is deliberate. Tools that promise to generate any formula from a description frequently invent functions or scramble argument order, and you only find out when the cell errors. This covers the handful of tasks that account for most real use, with the correct arguments guaranteed, rather than guessing at arbitrary ones.
Does the builder see my spreadsheet?
No. It assembles the formula text in your browser from the cell references you type and sends nothing anywhere. It also cannot check your data, so adjust the references to your layout and verify the result against a row you know.

Related tools in Text & SEO Content

Browse all Text & SEO Content tools
The Mac mini the ecech. site is built on, beside a handwritten note reading ecech.com.

Made by one person

ecech. is not a content farm. Every tool here is written and checked by hand, one at a time, by someone who wanted the tool to exist and could not find a version that showed its working.

No accounts and no sign-in, and nothing you type reaches a server — every calculation on this page runs inside your browser. The ads are served by Google and do set their own cookies, which is set out in full on the privacy page. More about the site.