How to Change Data Type in Google Sheets
When you paste data into Google Sheets, it tries to guess what kind of information you are working with - text, numbers, dates, or currency. But it doesn't always guess correctly. This quick tutorial walks you through how to fix those mismatched data types so your formulas, charts, and pivot tables work exactly as you expect them to.
Why Does Data Type Matter in Google Sheets?
In a spreadsheet, the data "type" tells Google Sheets how to interpret a value in a cell. Is "10/30/2024" a date, a piece of text, or the result of a division problem? The data type provides that context, and getting it right is fundamental for accurate analysis.
Here’s why it’s so important:
Calculations: You can't perform mathematical operations on text. If your sales figures are accidentally formatted as "Plain text," your
SUM()orAVERAGE()formulas will return a#VALUE!error or a zero.Sorting and Filtering: If dates are stored as text, they won't sort chronologically. Instead, they’ll sort alphabetically ("12/01/2024" would come before "2/15/2024"). The same goes for numbers stored as text.
Charts and Visualizations: To create an accurate timeline chart, Google Sheets needs to recognize your data as dates. If the data is text, it can’t build a proper time-series chart.
Consistency: When exporting data from other platforms like Shopify, Salesforce, or your CRM, you often end up with mismatched formats. A list of product prices might contain "$19.99" (text) and "29.99" (number) in the same column, leading to messy data that’s hard to work with.
Taking a moment to correct data types saves hours of frustrating troubleshooting down the line.
How to Quickly Identify Data Types
Before you can fix the format, you need to spot it. Google Sheets gives you a simple visual clue by default:
Numbers, dates, currency, and times will align to the right side of the cell.
Text will align to the left side of the cell.
If you see a column of what should be numbers but they are all hugging the left side of their cells, you’ve likely got a data type problem. This left/right alignment is a great first indicator, but for a more definitive answer, you can use Sheets’ built-in “IS” functions.
Using Functions to Test Data Types
In a blank column next to your data, you can use these simple formulas to test what Google Sheets thinks a cell contains. They will return either TRUE or FALSE.
`=ISTEXT(A1)`: Returns TRUE if cell A1 contains text.`=ISNUMBER(A1)`: Returns TRUE if cell A1 contains a number.`=ISDATE(A1)`: Returns TRUE if cell A1 contains a valid date.
This is a surefire way to diagnose columns where you suspect mixed or incorrect data types.
The Easiest Way: Using The “Format” Menu
For most situations, changing a data type is as simple as highlighting your cells and selecting the right format from the toolbar menu. This approach works perfectly when the underlying values are clean and just need their format changed.
Follow these steps:
Select the Cells: Click and drag to highlight the single cell, column, or range of cells you want to change. To select an entire column, click the column letter (e.g., A, B, C) at the top.
Go to the Format Menu: In the top menu, click on Format > Number.
Choose Your Desired Format: A dropdown menu will appear with the most common data types.
Understanding the Key Number Formats
Plain Text: Forces anything in the cell to be treated as a string of text. This is useful for things like ZIP codes or employee IDs with leading zeros (e.g., ‘00123’), which would otherwise be shortened to ‘123’ if formatted as a number.
Number: The standard format for numerical data. It typically displays a thousand separator and two decimal places (e.g., 1,234.50).
Percent: This format multiplies the cell value by 100 and displays it with a percent sign (%). So, the number 0.25 becomes 25.00%.
Currency: Formats the number as a monetary value, adding a currency symbol (like $) and commas as thousand separators.
Financial: Similar to currency, but formats with standard accounting practices, like aligning currency symbols to the left of the cell.
Date: Converts a number into a date format (e.g., 10/30/2024). This is possible because spreadsheets store dates as sequential numbers.
Time & DateTime: Formats numbers as a time of day or a combination of a date and time.
Simply choosing the right option from this menu will solve about 80% of data entry formatting issues.
Troubleshooting: How to Fix Numbers Stored as Text
Frequently, when you import a CSV file or copy-paste data from another source, your numbers arrive as text. You'll know this has happened because they’ll be left-aligned, and functions like =SUM() will ignore them. Forcing them back to a number format often requires more than just the ‘Format’ menu.
Method 1: The VALUE() Function
The VALUE() function is specifically designed to convert a text string that looks like a number into an actual number.
Insert a new column next to the column of text-based numbers (let’s assume your numbers are now in column A).
In the first cell of the new column (e.g., B1), enter the formula:
`=VALUE(A1)`Drag the blue fill handle (the small square in the bottom-right corner of cell B1) down to apply the formula to the rest of the cells in column A.
You now have a new column of true numbers. You can copy this new column and use Paste Special > Paste values only to replace the original text column.
Method 2: Use a Simple Mathematical Operation
A quick-and-dirty method to force a conversion is to perform any mathematical operation on the text. Sheets will recognize that you want to do math and will convert the values on the fly.
Find an empty cell anywhere on your sheet and type the number 1.
Copy that cell (Ctrl + C or Cmd + C).
Select the entire range of numbers stored as text.
Right-click on the selection, go to Paste special and choose Multiply.
This action multiplies every selected cell by 1, which doesn’t change the value but does force Google Sheets to reinterpret them as numbers.
Method 3: Turn on Error Checking
Google Sheets sometimes can detect mismatched data automatically if you enable the feature.
Go to Tools > Error Correction > Suggest from analysis. This doesn’t explicitly offer cell formatting, but Google Sheets automatically adds small green triangles in the top corner of cells where it detects an issue like a number stored as text.
If you see a green triangle on your cells, hover over it.
A small notification will appear, often suggesting “Convert to number”. Click it to fix the issue.
Troubleshooting: Converting Text Strings into Usable Dates
Fixing dates stored as text can be tricky because there are so many ways a date can be written ("October 30, 2024", "30-Oct-2024", "10/30/24"). Your goal is to convert these strings into a valid data serial number that Sheets can understand.
Method 1: The DATEVALUE() Function
Similar to the VALUE() function, the DATEVALUE() function converts a date that is stored as text into a serial numerical value.
For example, if cell A1 has the text "10/30/2024":
This formula will return the number 45922. At first glance, that doesn’t look like a date! That’s because that is how Sheets handles dates internally. Simply use the "Format" menu, select Number > Date and your cell will show “10/30/2024”.
Method 2: Split Text to Columns
Sometimes, the "split text to columns" function can be coaxed into recognizing a date format.
Select the column on dates stored as text.
Go to Data > Split text to columns.
In the separator menu that appears, choose the default separator (e.g., space or comma).
This action forces Google Sheets to re-evaluate the contents of each cell and often it will recognize what should be a date and convert them automatically.
Final Thoughts
Mastering data types in Google Sheets is a fundamental skill for anyone working with spreadsheets. Instead of letting it set back your calculations, use simple cues of left-aligned numbers and right-aligned dates to spot the mishaps. For a quick fix, the Format > Number menu is your go-to tool, while functions like VALUE() and DATEVALUE() quickly fix the data.
Organizing clean data is usually the first and most time-consuming step in any data analysis project. It’s one where a tool like Graphed really makes a difference. Instead of manually fixing and reformatting data from huge CSVs, Excel files, or Facebook Ads exports, we handle that for you automatically. Our combined engine does more than math beautifully, it considers your data according to the expected industry standards — freeing you from manually finding insights without getting stuck in the clutter of spreadsheet organization.