How to Convert Numbers Stored as Text in Google Sheets

Turn imported amounts into numbers, check the total against a worked example, and keep ZIP codes and identifiers with leading zeros intact.
Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.
Quick answer
Use
=ISNUMBER(A2)to test an imported value. If it returns FALSE for an amount you need to add, enter=VALUE(A2)in a new column and test the result. Keep account codes, ZIP codes and other identifiers as text when their digits or leading zeros must stay exactly as supplied.
Make a sample with a known answer
On a practice tab with a U.S. number format, type an apostrophe before each of these entries in A2:A4 to store them as text. The apostrophe is an entry instruction. The visible amounts are 12.50, 3.25 and -1.75. Treat them as three adjustments whose total should be 14.00.
Decide which values belong in the conversion
| Imported field | Example | Action |
|---|---|---|
| Amount | 12.50 | Convert to a number for arithmetic. |
| Quantity | 0 | Keep the numeric zero. A missing quantity and zero have different meanings. |
| Item code | 00128 | Leave as text to preserve all five characters. |
| Date-like identifier | 03/04 | Keep as text unless this field is intentionally a date. VALUE can interpret date and time strings too. |
Convert and check the sample
- Label B1 Numeric amount. In B2 enter
=IF(LEN(A2)=0,"",IF(ISNUMBER(A2),A2,VALUE(A2))). Fill down through B4. This preserves existing numeric amounts and leaves missing entries visually empty. - Test
=ISNUMBER(B2)in an unused cell. It should return TRUE. For this sample,=COUNT(B2:B4)should return 3 and=SUM(B2:B4)should return 14. - Format B as a number with two decimal places if you want 14.00 on screen. Keep the source column until the count and total agree with an independently known result.
Handle decimal commas and conversion errors
Look at a known amount before converting a whole export. The text 1,234 could represent a thousand or a little over one, depending on the source convention. On desktop, check the spreadsheet locale under File → Settings. Locale changes affect the whole spreadsheet. If conventions differ, test the import in a separate spreadsheet with the appropriate locale. Avoid stripping commas indiscriminately or turning conversion errors into zeros.
Finish the import
If text includes a unit in a separate delimited field, split the amount and unit into columns first. For pasted labels or amounts with invisible padding, inspect the spaces in the source. Keep the helper for repeat imports, or copy verified results with Paste special → Values only into a new range. Google’s VALUE function reference.
Comments
Comments are reviewed before they become public.
Sign in with Google to leave a comment.
Sign in with GoogleNo approved comments yet. Be the first to start the discussion.