1. Lighthouse

Level 3 · Numbers stored as text

The request

From Nicole Cox, Support Specialist

“My October refunds total from the returns export is about $1,600 lower than what finance paid out. Same rows, same month. I think the export is doing something odd with some amounts. Can you find out and give me the right total?”

Your goal

In F2:F45, convert each refund_amount in column E to a real number with VALUE. Then in I1 put the SUM of the raw column E2:E45, in I2 the SUM of your converted column F2:F45, and in I3 how many amounts in E2:E45 are stored as text (COUNTA minus COUNT).

  • Fill F2:F45, I1:I3 with the right valuesnot done yet
  • With formulas, not typed numbersnot done yet
  • Use VALUE SUM COUNTA COUNTnot done yet

Your sheet

Excel
The sheet for this level
ABCDEFGHIJ
1return_idorder_item_idreturned_onreasonrefund_amountrefund_valueSUM of refund_amount
21434254182025-10-01changed_mind28.99SUM of refund_value
31435254502025-10-02wrong_item28.99Amounts stored as text
41436246412025-10-04changed_mind23.98
51437254192025-10-04damaged159.00
61438248272025-10-05changed_mind141.98
71439251162025-10-05late219.00
81440254202025-10-05damaged159.00
91441252292025-10-06late149.00
101442256332025-10-06damaged67.96
111443257362025-10-06damaged398.00
121444253182025-10-08changed_mind143.88
131445256352025-10-09wrong_item35.98
141446252302025-10-10changed_mind169.00
151447257322025-10-11damaged185.98
161448258012025-10-11wrong_item20.99
171449258182025-10-12changed_mind18.99
181450257462025-10-13wrong_item23.99
191451251342025-10-14changed_mind52.99
201452256342025-10-15late179.00
211453259762025-10-15damaged35.97
221454258202025-10-17changed_mind27.99
231455259632025-10-18damaged28.99
241456259952025-10-18damaged134.97
251457254212025-10-19late107.98
261458259782025-10-19wrong_item54.99
271459251282025-10-20late179.00
281460252932025-10-20changed_mind39.98
291461260412025-10-20damaged15.99
301462261142025-10-20damaged29.99
311463260092025-10-21wrong_item56.97
321464259752025-10-22wrong_item779.00
331465260102025-10-22wrong_item104.99
341466260402025-10-22damaged17.99
351467260442025-10-22wrong_item92.99
361468261932025-10-22wrong_item27.99
371469261712025-10-24wrong_item25.99
381470259042025-10-25changed_mind982.60
391471261622025-10-25damaged323.94
401472261522025-10-26damaged18.99
411473262982025-10-26wrong_item20.99
421474257842025-10-27late179.00
431475259872025-10-30late11.99
441476262862025-10-30damaged53.99
451477264192025-10-30wrong_item72.99
46
47

Loading the editor…

    ResultPress Check to compare F2:F45, I1:I3

    Mote checks your result

    Press Check. Each right cell becomes a firefly in your lantern.

    The lesson

    Nicole’s total is wrong, and nothing on the sheet says so. No error, no warning, just a smaller number. The cause is the most common data problem in spreadsheets: numbers stored as text.

    Why an export does this

    A CSV file has no types. Every value is just characters, and the program that reads it has to guess what each one is. Columns that were set to Text, values with a stray space, an apostrophe or a currency sign, systems that quote the amounts someone edited by hand: all of these can leave "141.98" in a cell as text. This sheet is built the same way: the returns portal writes the refunds approved by hand (reason changed_mind) as text, and the rest as numbers.

    The tell: alignment

    Excel and Google Sheets put numbers on the right edge of a cell and text on the left, unless someone overrode the alignment. Scan column E: E3 (28.99) sits on the right, E2 (28.99) on the left. Same amount, different type. The 0.00 format doesn’t help either: it only applies to numbers, so E14 shows 169.00 because those are the characters in the text, not because it was formatted. Desktop Excel also marks such cells with a small green triangle (“Number stored as text”).

    You can ask directly, too: =ISTEXT(E2) is TRUE, =ISNUMBER(E2) is FALSE.

    What SUM does with text

    Formula What happens to "28.99" in E2
    =SUM(E2:E45) skipped: ranges in SUM, AVERAGE, MIN, MAX keep only numbers
    =E2+E3 converted: arithmetic operators turn numeric text into a number
    =COUNT(E2:E45) not counted: COUNT counts numbers only
    =COUNTA(E2:E45) counted: COUNTA counts every cell that isn’t empty

    So =SUM(E2:E45) returns 4,002.58, while the 44 refunds really add up to 5,632.96. The ten text amounts, 1,630.38 in all, simply vanish. That is Nicole’s “about $1,600”.

    The fastest check on any column you are about to total:

    I3   =COUNTA(E2:E45)-COUNT(E2:E45)

    It returns 10 here. On a clean column it returns 0.

    Converting with VALUE

    VALUE(text) reads numeric text and returns the number:

    F2   =VALUE(E2)

    F2 shows 28.99, right-aligned, and a real number. On a cell that already holds a number, VALUE returns it unchanged, so one formula works for the whole column. Fill it down, then =SUM(F2:F45) gives 5,632.96.

    Two shortcuts do the same job: =E2*1 and =--E2 (two minus signs). Both force arithmetic, and arithmetic converts. VALUE says what you mean, which helps the next person reading the sheet.

    VALUE returns #VALUE! when the text isn’t a number at all, like "n/a" or "$1,200 approx". That is useful: it shows you the cells that need a person, not a formula.

    Common mistakes

    • Changing the format to Number. The cell still holds text; SUM still skips it. Convert the value (VALUE, or in Excel, Data > Text to Columns > Finish on the column).
    • Trusting a total without a count. Compare COUNT with the number of rows. 34 numbers in a 44-row column means ten are missing from every sum.
    • Fixing it only in the total. A clever one-cell formula can convert and add at once, but the next pivot or chart on column E is still wrong. Convert into a clean column and build on that.
    • Regional settings. VALUE("1.234,50") works in Europe and fails in the US. Exports from another country’s system need a SUBSTITUTE first.

    Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.