Direct Answer: Convert Text Numbers With VALUE
When imported numbers are stored as text, SUMIFS and AVERAGEIFS can ignore them, and exact lookups like XLOOKUP or VLOOKUP can fail to match numeric IDs against text IDs. Clean spaces and convert with VALUE:
=VALUE(TRIM(A2))
Worked Example: Text Numbers vs. Numeric Output
| Cell A2 (Text Input) | =VALUE(TRIM(A2)) |
Why Conversion Matters |
|---|---|---|
" 1250 " |
1250 |
Strips spaces and converts to numeric 1250 |
"45.50" |
45.5 |
Ready for numeric math and totals |
Tips & Error Prevention
- Currency symbols or commas inside text: If a string has extra symbols like
$or non-breaking spaces, clean with TRIM orSUBSTITUTEbefore wrapping inVALUE. - Non-convertible text returns
#VALUE!: Wrap in IFERROR(..., 0) if you need a safe fallback on messy rows.