EXCEL & GOOGLE SHEETS GUIDE

Excel formula generator: start with the right task

Describe a rightward exact lookup and get a VLOOKUP formula with an explanation. This version generates VLOOKUP only; the guides below teach other formula types with manual examples.

Generate a lookup in three steps

  1. Describe the result: “Find the price for the product ID in A2 using Products column A, and return column C.”
  2. Enter the references: lookup cell A2, table range Products!$A$2:$C$4, return column 3. Choose Excel or Google Sheets.
  3. Check and paste: confirm the formula’s references and test a known product before filling down.

The tool is linked above and requires no spreadsheet connection. Optional details are especially helpful when a description could refer to more than one column.

Example input and expected formula

Products!A1:C4 — sample product catalog
RowA: IDB: ProductC: Price
2P-101Notebook4.50
3P-204Stapler12.00
4P-318Markers7.25
=VLOOKUP(A2,Products!$A$2:$C$4,3,FALSE)

Put P-204 in Orders!A2 and paste this into Orders!B2. The result is 12.00. A2 is the search value; Products column A is searched because it is the first column of the selected range. The number 3 returns the price in the third column. FALSE makes the match exact.

The $ markers lock the catalog when you fill the result down. A missing product returns #N/A. Duplicate IDs return the first match rather than a total; decide whether your catalog should have unique IDs.

Choose a formula for the job

Generation support in this version
Your taskFormula to learnGenerated here?
Return a value to the right of an IDVLOOKUP with FALSEYes
Return a value to the leftXLOOKUP or INDEX MATCHNo — manual guide
Count rows with one conditionCOUNTIFNo — manual guide
Add amounts with several conditionsSUMIFSNo — manual guide

For example, =COUNTIF(B2:B6,"Open") counts matching status cells. It does not fetch the description next to the first Open status. =SUMIFS(C2:C6,B2:B6,"Paid") adds matching amounts. Those tasks need their own functions rather than a different return-column number.

Avoid the two common reference mistakes

First, start the table at the column containing the ID. If IDs are in F, select F:H rather than A:H. Second, count the return column within that range: H is column 3 of F:H, not column 8. For an exact lookup from F to H, use:

=VLOOKUP(A2,$F$2:$H$100,3,FALSE)

Use the troubleshooting guide if the result is missing, from the wrong column, or unexpectedly close to the requested ID.

Frequently asked questions

Is this a generator for all Excel functions?

No. The current generator handles only rightward exact-match VLOOKUP. The other pages teach their functions and include formulas you can adapt by hand.

Can I paste a whole workbook?

This version accepts a text request and optional references, not workbook uploads. It cannot inspect your sheets or infer unseen data.

What should I enter for a sheet name with spaces?

Quote the sheet name, for example 'Product Catalog'!$A$2:$C$100. The first column of that range must contain the lookup keys.