Skip to content
AI Skill Index
DataChatGPTGemini

Explain and fix a spreadsheet formula

Understand a formula you inherited, then repair it.

Author: EditorialWritten for: ChatGPT, Gemini
Sign in to save
Here is a formula from a spreadsheet I inherited:

`[PASTE FORMULA]`

1. Explain what it computes, in plain language.
2. Name the conditions under which it silently gives a wrong answer — empty cells, text in a number column, ranges that grow.
3. Give a corrected version, and say what you changed.

Target: [Excel / Google Sheets].

Highlighted parts are placeholders. Replace them before you send.

Worked example

The input is invented for this page. The output shows what the prompt asks for with that input.

Example input (invented)

Formula: =VLOOKUP(A2,Prices!A2:B40,2)

Target: Google Sheets

Example output

What it computes. It takes the product code in A2, looks for it in the first column of rows 2 to 40 on the Prices sheet, and returns the value next to it from column B, which is the price.

When it gives a wrong answer without an error.

  • The fourth argument is missing, so the lookup is approximate. A code that is not in the price list gets the price of the nearest smaller code. If the list is not sorted by code, a code that is in the list can return the wrong price too.
  • The range A2:B40 has no $ signs. Copied down one row it becomes A3:B41, so each row searches a block that has slipped by one and the top of the list drops out.
  • The range stops at row 40. A product added in row 41 is never found.

Corrected version.

=IFERROR(VLOOKUP(A2,Prices!$A$2:$B,2,FALSE),"code not in price list")

FALSE makes the match exact, so a missing code no longer borrows a neighbour's price. The $ signs keep the range fixed when you copy the formula down. $A$2:$B has no end row, so new products are included. IFERROR replaces #N/A with a message you can filter on.

One case stays with the data. A code typed as the number 1042 does not match the text "1042" in the price list. The corrected formula reports it as not in the price list, and you fix it by giving both columns the same type.

ShareXLinkedIn

3 of the 5 other prompts filed under Data.

Data tools and skills

1 tool and 3 skills are filed under Data, the same category as this prompt.

Tool

Julius AI

Chat with a spreadsheet and get analysis plus charts.

Freemium
Skill

Data cleaner

Profiles a messy dataset and proposes fixes before changing anything.

Claude Code, Any agent
Skill

Data table analyst

Reads a table and reports what changed, with the caveats left in.

Claude.ai, ChatGPT, Any agent
Skill

Migration safety checker

Finds the database migrations that will lock a table or break running code.

Claude Code, Cursor, Any agent

Cookies

We use only the cookies this site needs to work. Optional analytics helps us see which content is worth writing more of — nothing loads until you say yes.

Read the privacy policy