Skip to content
SheetFluent

Text functions: clean data with formulas

Data copied from another system is often messy: codes that pack several facts together, names in capitals, extra spaces, and numbers that won't add up. Text functions fix it with a formula, so the same fix runs on every row.

LEFT, RIGHT and MID take apart codes, UPPER, LOWER and PROPER fix capitals, TRIM removes extra spaces, and &, CONCAT and TEXTJOIN join names. VALUE turns text into numbers you can add up, and SUBSTITUTE, FIND and SEARCH swap and find characters.

Start practicing

Lessons in this topic

  1. 1
    Take part of a text with LEFT, RIGHT and MID

    Pull parts out of codes and IDs with LEFT, RIGHT and MID in Excel and Google Sheets: the start, the end, or a piece from the middle.

    PlusAbout 5 minutes
  2. 2
    Count characters with LEN

    Use LEN to count the characters in a cell, and spot mobile numbers that are too short or too long before they cause trouble.

    PlusAbout 4 minutes
  3. 3
    Fix capitals with UPPER, LOWER and PROPER

    Tidy names and cities typed in the wrong capitals with PROPER, UPPER and LOWER, so every row of the list looks the same.

    PlusAbout 4 minutes
  4. 4
    Join text with &, CONCAT and TEXTJOIN

    Join first and last names, add labels, and build full addresses with &, CONCAT and TEXTJOIN in Excel and Google Sheets.

    PlusAbout 6 minutes
  5. 5
    Remove extra spaces with TRIM

    Clean names pasted from other systems with TRIM: it removes spaces at the start and end, and squeezes double spaces down to one.

    PlusAbout 5 minutes
  6. 6
    Turn text into numbers with VALUE

    Numbers pasted from a PDF or website often arrive as text, and SUM skips them. Use VALUE to turn them back into numbers you can add up.

    PlusAbout 5 minutes
  7. 7
    Swap characters with SUBSTITUTE

    Use SUBSTITUTE to remove a currency sign, swap spaces for dashes, or replace any text inside a cell, then turn prices back into numbers.

    PlusAbout 5 minutes
  8. 8
    Find text inside a cell with FIND and SEARCH

    Use FIND and SEARCH in Excel and Google Sheets to get the position of text in a cell, with or without matching capitals, and with wildcards.

    PlusAbout 5 minutes
  9. 9
    Split names and take text before a character

    Split a full name into first and last name, and take the text before or after a character, with LEFT, MID and FIND in Excel and Google Sheets.

    PlusAbout 6 minutes

Next topic: Working with dates