Prompt Details
Model
(claude-5-5-sonnet)
Token size
479
Example input
[FIX MY FORMULA / WRITE A FORMULA / EXPLAIN A FORMULA]: FIX MY FORMULA
[e.g., Excel 365, Excel 2021, Excel 2016, Google Sheets]: Excel 365
[describe the result you need in plain words]: Percent change from the old value in A to the new value in B.
[paste your formula and the error or wrong result, or write "none"]: =(B2-A2)/B2 gives 20% for 80 to 100, but I expected 25%.
[paste 3-8 rows with cell addresses, e.g., A2 = 80, B2 = 100]: A2 = 80, B2 = 100; A3 = 200, B3 = 150
Example output
1. Diagnosis
Your formula divides the change by the new value (B2), but percent change must be divided by the old value (A2).
2. The formula
=(B2-A2)/A2
3. How it works
B2-A2 gives the change: new value minus old value.
/A2 divides that change by the starting value, so the result shows how big the change is compared with where you began.
Format the cell as Percentage (Home tab, Number group, % button) so 0.25 displays as 25%.
4. Test on your sample
Row 2: (100-80)/80 = 20/80 = 0.25, which shows as 25%.
Row 3: (150-200)/200 = -50/200 = -0.25, which shows as -25% (a decrease).
Your original formula gave 20/100 = 20% for row 2, which is why it did not match your expectation.
5. Why this goes wrong
Percent change always asks "how much did it change compared with the starting point?" The starting point is the old value, so it must be the divisor. Dividing by the new value is a very common slip because B is the value you are looking at most. A quick check: if the old value is 80 and you add 25% of 80 (which is 20), you land on 100, so 25% is correct.
6. If you use an older version
Not relevant here. This formula works in every version of Excel. If your regional settings use semicolons as separators, the formula stays the same because it has no commas.
Get this prompt + 9 more with Select$14 your first month, then $19/mo$14 first month, then $19/mo
View SelectBy purchasing this prompt, you agree to our terms of service
CLAUDE-5-5-SONNET
Fix, write, or explain any Excel formula, with a clear reason why it went wrong so it doesn't happen again. Three modes: FIX MY FORMULA, WRITE A FORMULA, EXPLAIN A FORMULA. It tests the formula on your sample data, uses only functions your Excel version has (no XLOOKUP in Excel 2016), spots non-formula problems like numbers stored as text, and asks one short question if info is missing. Tested with Claude on lookups, SUMIF, COUNTIFS, nested IF, and percent change.
...more
Added 3 days ago
