To work with text in Google Sheets, type it into a cell, then use the toolbar or Format menu to control its appearance. For text that must stay exactly as entered—such as a code with leading zeros—select the cells and choose Format > Number > Plain text before entering the data. Sheets can also wrap, split, search, and clean text, so it can handle more than simple labels.
What Text Means in Google Sheets
Text is any cell content Sheets treats as characters rather than a number or date. Names, addresses, product codes, notes, and phone numbers are typical examples. A cell can also contain a formula that returns text, but that is different from typing a text value directly. Sheets may automatically interpret an entry such as a date or a number as a date or number instead of preserving its exact characters.
This distinction matters when the visible characters carry meaning. A product code such as 00481 is not necessarily a quantity of 481, and a phone number beginning with zero should not lose that zero. Before entering or importing such values, decide whether the column represents values for calculation or identifiers that should remain unchanged. Text is usually appropriate for identifiers; numeric values are usually preferable when you intend to calculate.
Enter, Edit, and Add Text
Click a cell, type the text, and press Enter to commit it. To edit existing content, double-click the cell or select it and edit in the formula bar above the grid. You can also select a cell and start typing to replace its contents. Press Escape before committing an edit if you want to cancel it. To put a line break inside a cell while editing, use Ctrl+Enter on Windows or Chromebook; on a Mac, use Command+Enter.
For a small set of entries, type directly into cells. For a list copied from another source, paste it into the starting cell; tab-separated content commonly fills columns, while line breaks commonly fill rows. Check the result before continuing, especially if the source includes tabs or line breaks within quoted text. A paste can fill neighboring cells and overwrite existing data.
- Use a clear header such as Customer name or Item code to explain what a text column contains.
- Keep one kind of information in each column. Put a person’s first and last name together only if your task does not require sorting or processing them separately.
- For repeated choices such as Pending, Approved, and Rejected, consider a dropdown made with Insert > Dropdown to reduce inconsistent spelling.
Set Cells to Plain Text
To set a cell or range to text in the browser version of Google Sheets, select it and choose Format > Number > Plain text. This is useful before entering postal codes, employee IDs, or other strings that resemble numbers. If you type an apostrophe before an entry, such as ‘00481, Sheets treats the following characters as text and does not display the apostrophe in the cell. The apostrophe is a quick option for an isolated value; changing the format first is easier for a whole column.
Formatting a cell as Plain text does not reliably restore characters that Sheets already removed during automatic interpretation. If 00481 has already become 481, changing the format cannot know that two zeros were originally present. Re-enter the original value after setting the format, or recover it from the source. The same caution applies when a date-like entry has already been converted into a date value.
To check how Sheets interpreted a cell, select it and look at the formula bar and the number format. A value aligned or displayed in an unexpected way is not conclusive evidence by itself, because alignment and custom formatting can change appearance. When exact character preservation matters, test a few representative entries first and verify the displayed result.
Change Text Appearance and Alignment
With cells selected, the toolbar provides common text controls such as font, font size, bold, italic, text color, and fill color. The Format menu offers further controls. Use Format > Text wrapping to choose how content behaves when it is wider than the cell, and use Format > Alignment to position it within the cell. Horizontal alignment can also be changed from the toolbar. These controls affect presentation, not the underlying words.
Text rotation can help with narrow column headings. Select the cells and use Format > Rotation to choose an available direction or angle. Keep rotated labels readable and avoid applying rotation to long paragraphs. Formatting should make a sheet easier to scan: use a consistent heading style, reserve strong colors for meaningful distinctions, and avoid relying on color alone to communicate status.
To copy appearance without replacing cell contents, use Paint format on the toolbar. Select the cell with the desired formatting, click Paint format, and then select the destination cells. For many cells, double-clicking Paint format can keep the tool active while you apply the style in more than one place; press Escape when finished.
Wrap, Clip, or Let Text Overflow
When a text entry is wider than its column, Sheets can display it in three ways. Select the cells and use Format > Wrapping to choose Overflow, Wrap, or Clip. Overflow lets text appear across adjacent empty cells. Wrap puts the text on multiple lines and can increase row height. Clip hides the part that does not fit inside the cell. Wrapping is often the clearest choice for notes; clipping can suit compact tables where the full entry is available by selecting the cell.
Overflow does not erase text in neighboring cells, but content in those cells prevents the overflow from showing across them. If a long heading appears cut off, widen the column, turn on wrapping, or shorten the heading. Drag the divider between column letters to resize a column, or double-click the divider to fit its contents. Auto-fitting to a very long note can make the column impractically wide, so wrapping is often better for descriptive text.
Split and Clean Text
If one cell contains several values separated by a consistent character, Sheets can divide them into columns. Select the cells, choose Data > Split text to columns, and select or specify the separator in the separator control that appears. For example, a list formatted as North, East, South can be split at commas. Check the destination columns first: splitting can replace content to the right of the selected cells.
For a one-time cleanup, the menu command is often simpler than a formula. For repeatable cleanup, text functions can help. With an imported name in A2 that contains extra spaces, use =TRIM(A2) in another cell; for example, if A2 contains two spaces before and after the word North, the result is North with ordinary single spacing. TRIM is useful for removing extra spaces at the beginning and end and reducing repeated spaces between words.
With a product code in B2 such as SKU-482, use =LEFT(B2,3) in another cell to return SKU, the first three characters. LEFT, RIGHT, MID, LEN, UPPER, LOWER, and SUBSTITUTE are common tools for extracting, measuring, changing case, or replacing text. Keep the original data until you have checked the output. A formula result changes when its source changes, while copying and using Edit > Paste special > Values only replaces formulas with their current results.
Common Text Problems and Fixes
- Leading zeros disappear: Set the destination to Plain text before entry or paste, or prefix one value with an apostrophe. If the zeros have already been lost, retrieve them from the source rather than guessing.
- A long entry runs into other cells: Select the cell and choose Format > Wrapping > Wrap, widen the column, or use Clip if hiding the excess is acceptable.
- Text that looks identical does not match in a search: Look for extra spaces, different punctuation, or a nonbreaking space copied from a web page. TRIM handles ordinary extra spaces; pasted special characters may need separate cleanup.
- A value turns into a date or number: Set the cells to Plain text before re-entering or pasting. Formatting afterward may not reverse the conversion.
- Sorting puts entries in an unexpected order: A text column sorts as text, not necessarily by numeric magnitude. For example, codes that look like numbers can sort character by character. Choose a consistent data type and structure if numeric ordering is required.
When the problem comes from an imported file, inspect a few rows before transforming the full column. Separators, character encoding, and automatic type detection can affect the result. A comma may be a delimiter in one file but part of an address in another, so splitting every row without checking the source can create incorrect columns.
Google Sheets and Excel Differences
Google Sheets and Microsoft Excel both support text formatting, wrapping, and many familiar text functions, but their menus and sharing models differ. The paths in this guide are for Google Sheets in a web browser. Excel has its own ribbon commands and may handle pasted or imported data differently, so do not assume that a Sheets menu path exists in Excel. In either program, verify data that resembles a date, number, or identifier after import. Sheets also saves changes to the online spreadsheet as you work, while Excel’s saving and collaboration behavior depends on where the workbook is stored and how it is opened.
Frequently Asked Questions
How do I keep leading zeros in Google Sheets?
Select the cells and choose Format > Number > Plain text before entering the values. For a single entry, prefix it with an apostrophe. If the zeros have already disappeared, re-enter the original value or retrieve it from its source.
How do I make text fit in a Google Sheets cell?
Select the cell and choose Format > Wrapping > Wrap to show the full entry on multiple lines. You can also widen the column. Clip hides the excess, while Overflow displays it over neighboring empty cells.
How do I split text into separate columns?
Select the data and choose Data > Split text to columns. Choose the correct separator, such as a comma or space, and check that cells to the right are empty so the split does not overwrite other information.
Can Google Sheets automatically detect text?
Sheets interprets many entries as they are typed or pasted and may recognize dates and numbers rather than keeping the exact characters. Use Plain text before entering identifiers or other values whose characters must be preserved.
How do I remove extra spaces from text?
Use the TRIM function in a new cell, such as =TRIM(A2) when the original text is in A2. Check the cleaned result before replacing the source, because special whitespace copied from websites may require additional handling.
Related
- Inventory Spreadsheet in Google Sheets or Google Docs?
- Google Sheets Inventory Spreadsheet: Setup and Tips
- Inventory Spreadsheet: Simple Setup and Useful Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Formulas vs Excel: Key DifferencesGoogle Sheets and Excel use many of the same formula conventions, so everyday calculations such as sums, averages,…
- DVD Labels in Microsoft Word: Setup and Printing GuideYes. You can create DVD labels in Microsoft Word by opening a matching label template or laying out…
- Labels in Excel and Word: Mail Merge Step-by-Step GuideTo create a sheet of address or product labels, organize each recipient or item in a separate row…
- How to Add Page Number X of Y in Word Documents EasilyTo show a running total such as “Page 3 of 12” in Microsoft Word, open Insert > Page…
- How to Delete a Page in the Word AppTo delete a page in the Word app, select the page’s contents and press Delete; Word does not…
- COUNTIF TRUE in Google Sheets: Count Boolean ValuesTo count cells whose value is the Boolean TRUE in Google Sheets, use =COUNTIF(A2:A20,TRUE), replacing A2:A20 with your…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.