Text Functions and Cleaning Text Data

Learn to take text apart, clean it up and put it back together in a spreadsheet. Extract names, codes and email parts with LEFT, RIGHT, MID, LEN, FIND and SEARCH; remove stray spaces and hidden characters with TRIM, CLEAN and SUBSTITUTE; join values with CONCAT and TEXTJOIN and split them with Text to Columns and TEXTSPLIT. Convert numbers and dates to readable text with TEXT and back into values with VALUE, use Flash Fill to complete a column from a few examples, and choose the method that suits each task. Examples use Excel, with the differences in Google Sheets pointed out where they matter.

IntermediateLesson 4 of 7 in Spreadsheet Formulas and Functions Course

What you will learn

  1. Measure text with LEN, take characters from the start, middle or end with LEFT, RIGHT and MID, and find where a character or word sits with FIND and SEARCH, so that one formula extracts the right part from entries of different lengths.
    • Take characters from the start, middle and end of text
      Count characters with LEN and copy a fixed number of characters with LEFT, RIGHT and MID, knowing that the results are always text.
    • Find where a character or word appears with FIND and SEARCH
      Return the position of a character or piece of text, choose between case-sensitive FIND and case-insensitive SEARCH with wildcards, and handle text that is not found.
    • Extract parts of different lengths by combining functions
      Nest FIND or SEARCH inside LEFT, RIGHT and MID to extract first names, last names, email parts and text between separators, and handle entries that do not fit the pattern.
  2. Remove the extra spaces, line breaks and invisible characters that imported or pasted text often carries, replace or delete unwanted text, and make capitalization consistent so that equal entries really are equal.
    • Remove extra spaces and hidden characters
      Use TRIM, CLEAN and SUBSTITUTE to strip unwanted spaces, line breaks and nonprinting characters, and check the result with LEN.
    • Replace text and standardize capitalization
      Replace or delete text with SUBSTITUTE, change text by position with REPLACE, count occurrences, and make capitalization consistent with UPPER, LOWER and PROPER.
  3. Combine values from several cells into one with the & operator, CONCAT and TEXTJOIN, and split one cell into several columns with Text to Columns or TEXTSPLIT, controlling separators, empty values and data types.
    • Join text with the & operator and CONCAT
      Join cell values and typed text into one value, add the spaces and punctuation yourself, and keep numbers and dates readable when they become part of text.
    • Join lists with a separator using TEXTJOIN
      Use TEXTJOIN to combine ranges and single values with a chosen separator, decide whether empty cells are skipped, and avoid the common traps.
    • Split text into columns with Text to Columns
      Use the Convert Text to Columns wizard to split one column at separators or at fixed positions, choose the data type of each new column, and protect neighboring data.
    • Split text with a formula using TEXTSPLIT
      Use TEXTSPLIT to split text into columns, rows or both with one or more delimiters, control empty and missing pieces, and turn the text results into numbers when needed.
  4. Turn numbers and dates into readable text with the TEXT function and its format codes, and turn text that only looks like numbers or dates back into values that formulas can calculate with.
    • Turn numbers and dates into formatted text with TEXT
      Write format codes for decimals, thousands separators, percentages, leading zeros, dates and times, and use TEXT to build readable labels without losing the original values.
    • Convert text that looks like numbers or dates into real values
      Recognize numbers and dates stored as text, convert them with VALUE, NUMBERVALUE or arithmetic, and decide which entries should stay text.
  5. Let Flash Fill complete a column from typed examples, check what it produces, and decide when a formula, Text to Columns or Flash Fill is the better tool for a text task.
    • Fill a column from examples with Flash Fill
      Type one or more examples next to the data, run Flash Fill, correct the pattern when it guesses wrong, and check every result.
    • Choose between formulas, Text to Columns and Flash Fill
      Compare the three ways of extracting, splitting and reshaping text, pick the one that suits the data and how it will be used, and finish the result safely.

Text Functions study guide

5 chapters

1

Pull out parts of text with position functions

Text fields often contain several useful pieces: a prefix, a year, a name or an email domain. A position tells you where a piece starts, and a character count tells you how much to take. Begin with fixed layouts, then use separators to handle entries of different lengths. Keep track of whether a formula returns a number or text, because a position can drive another formula while an extracted string may still need conversion.

1.1 Count positions and take a fixed piece

A text string is a sequence of characters. Letters, digits, spaces and punctuation all occupy positions. Positions start at 1 on the left, so a separator takes up a position just as a letter does.

Measure before cutting

LEN(text) returns a number: the string's character count. =LEN("INV-2025-00042") returns 14. The two hyphens count. =LEN("New York ") returns 9 because the final space counts too. An unexpectedly large length can reveal characters that are hard to see.

For a code in A2, choose the function that matches the location of the part you need:

FunctionWhat it takesExampleResult
LEFT(text,num_chars)Characters from the start=LEFT(A2,3)“INV”
RIGHT(text,num_chars)Characters from the end=RIGHT(A2,5)“00042”
MID(text,start_num,num_chars)Characters from a stated position=MID(A2,5,4)“2025”

LEFT and RIGHT take one character when their character count is omitted. Asking for more characters than the string contains returns the whole string. MID requires all three arguments. It stops at the end if the requested piece is too long; starting beyond the end returns empty text, "".

Locate the first character precisely

To extract the year, count “INV” as positions 1–3 and the hyphen as position 4. The year therefore begins at 5. In =MID(A2,5,4), the last argument is a count, not the position where extraction stops. The four characters occupy positions 5–8.

Starting at 4 instead gives “-202”. Write the positions below one representative entry when the layout is unfamiliar. Test another row before filling the formula down. A layout such as “PO-31-7” has different field lengths, so a fixed start and count will cut the wrong piece. A separator search can supply the positions for layouts that vary.

Digits can still be text

LEFT, RIGHT and MID return text. This preserves the zeros in “00042”, which is useful for an identifier. The extracted “2025” is also text; =VALUE(MID(A2,5,4)) converts it to a number when a calculation needs one. LEN already returns a number and needs no such conversion.

Functions read the stored value, not the cell's display format. If B2 stores 1234.5 and displays “1,234.50”, =LEN(B2) returns 6 and =LEFT(B2,2) returns “12”. A cell displaying March 14, 2025 stores 45730 in Excel's default date system; its LEN is 5. To extract from a formatted display, first create that display as text with TEXT.

These formulas use English function names and commas between arguments. Some regional settings use semicolons, as in =LEFT(A2;3), and translated Excel versions use local function names.

Key Takeaways

  • Positions start at 1, and spaces and punctuation count.
  • LEFT and RIGHT take characters from the ends; MID takes a count from a start position.
  • LEFT, RIGHT and MID return text, including strings of digits.
  • Text functions read stored values, so display formatting does not supply extra characters.
  • Fixed positions suit a layout whose field lengths stay the same.

1.2 Find a separator or test for text

A separator gives a formula a useful landmark. FIND and SEARCH return the position where a match begins. They do not extract the match itself. Their result can become the start position or character count in another function.

Choose the matching rule

Both functions use the same argument order: FIND(find_text,within_text,[start_num]) or SEARCH(find_text,within_text,[start_num]). The optional argument is shown in square brackets in syntax descriptions; leave the brackets out of a real formula.

NeedFunctionBehavior
Match capitalization exactlyFINDCase-sensitive; no wildcards
Find text despite differences in caseSEARCHIgnores case; accepts wildcards

For “Order Ref: ab-77” in A2, =SEARCH("ref",A2) returns 7. =FIND("ref",A2) returns #VALUE! because the stored word starts with a capital R. A space is a valid target: =FIND(" ","Maria Silva") returns 6. For “ana.lopez@example.com”, FIND returns 10 for the at sign.

Search with a pattern

SEARCH accepts ? for any single character and * for any sequence of characters. =SEARCH("b?x","Mailbox 12") returns 5, where “box” begins. To find punctuation that SEARCH would treat as a wildcard, escape it with a tilde: =SEARCH("~?","Why? Because") returns 4. FIND treats a question mark or asterisk as the literal character without this escape.

Neither function checks word boundaries. Searching for “art” finds it inside “Department store”, beginning at 4. If your task needs a whole word, include the relevant surrounding separators in the search and check entries at the start and end of cells too.

Find a later occurrence

The start argument changes where the search begins; it does not restart the numbering. With “INV-2025-00042” in A2:

  1. =FIND("-",A2) returns 4.
  2. Begin the next search one character later, at 5.
  3. =FIND("-",A2,FIND("-",A2)+1) returns 9, the second hyphen's position in the original string.

Starting the second search at 4 would find the first hyphen again. This is why the added 1 matters.

Handle a missing match

A missing target returns #VALUE!. An invalid start position, such as 0 or a position beyond the string, does too. IFERROR(value,value_if_error) provides a chosen fallback: =IFERROR(FIND("@",A2),0) returns 0 if the search fails. Zero is a useful “not found” signal because real positions begin at 1.

For a TRUE/FALSE contains test, use =ISNUMBER(SEARCH("express",A2)). ISNUMBER returns TRUE for a numeric position and FALSE for the failed search. =IF(ISNUMBER(SEARCH("express",A2)),"Priority","Standard") then labels orders. The search still matches “express” within a longer word; the wrapper changes the output type, not the matching rule.

Key Takeaways

  • FIND matches case; SEARCH ignores case and accepts wildcards.
  • Both functions return positions counted from the beginning of the original string.
  • Start after an earlier match to find the next one.
  • IFERROR supplies a fallback; ISNUMBER with SEARCH makes a contains test.

1.3 Extract text when field lengths vary

Use the separator's position to calculate how much text to keep. The pattern then adapts to each row instead of assuming that every name or code has the same length.

Take everything before or after a separator

Suppose A2 contains “Maria Silva”. The first space is at position 6. Text before it has one fewer character, so =LEFT(A2,FIND(" ",A2)-1) returns “Maria”. Omitting the subtraction keeps a trailing space. It may be invisible on screen but can prevent a later match.

The whole string has 11 characters. There are five characters after position 6, so =RIGHT(A2,LEN(A2)-FIND(" ",A2)) returns “Silva”. Another form starts immediately after the space: =MID(A2,FIND(" ",A2)+1,LEN(A2)). MID stops when it reaches the end; a count equal to the full string length safely reaches all the remaining text.

The same method splits “ana.lopez@example.com” into “ana.lopez” and “example.com”. Search for "@" instead of a space. The separator is excluded by subtracting 1 for the left part or adding 1 to the start of the right part.

Take a field between two separators

For “INV-2025-00042”, first locate both hyphens. Helper columns make the work easier to inspect:

  1. In B2, enter =FIND("-",A2). It returns 4.
  2. In C2, enter =FIND("-",A2,B2+1). It returns 9.
  3. In D2, enter =MID(A2,B2+1,C2-B2-1). Start at 5 and take four characters to obtain “2025”.

The length is the gap between the hyphen positions, minus the separator itself. Filling these formulas down to “PO-31-7” gives positions 3 and 6, a start of 4, and a count of 2. The middle field is “31”.

Once the steps work, they can be nested:

=MID(A2,FIND("-",A2)+1,FIND("-",A2,FIND("-",A2)+1)-FIND("-",A2)-1)

Each inner FIND supplies a number to the surrounding calculation. Keeping the helper columns is also valid when they make the sheet easier to maintain.

Deal with different layouts

A first-space rule extracts “Maria Lopez” after the first space in “Ana Maria Lopez”. That is all remaining text, not a reliable identification of a person's surname. Decide what the field means before applying a rule to names with multiple parts.

A single name such as “Cher” contains no space. If the intended output is the whole entry in that case, use =IFERROR(LEFT(A2,FIND(" ",A2)-1),A2). Clean leading spaces first: a leading space is found at position 1 and makes the requested left piece empty. Test the formula on short entries, long entries and missing separators.

In Excel for Microsoft 365 and Excel 2024, =TEXTBEFORE(A2," ") takes the text before the first space. =TEXTAFTER(A2," ",-1) takes the text after the last one; the negative instance counts from the end. A missing separator produces #N/A unless the function's if_not_found argument supplies a fallback.

Key Takeaways

  • Before a separator at p, take p−1 characters; after it, start at p+1.
  • Between two separators, the count is the second position minus the first minus 1.
  • Helper columns let you check each position before nesting functions.
  • A name-splitting rule needs a clear meaning for each output field.
  • Missing separators need a deliberate fallback.
  • TEXTBEFORE and TEXTAFTER offer shorter formulas in newer Excel versions.
2

Clean and standardize messy text

Pasted and imported text can carry spaces and invisible characters that affect comparisons. Cleaning means changing those stored characters while keeping useful word boundaries. Different functions handle ordinary spaces, control characters, matching text and capitalization. Work in a helper column so you can compare the result with the original and decide when the cleaned values are ready to replace it.

2.1 Remove spaces and invisible characters

Two entries can look identical but contain different characters. An extra space after “Lisbon” can make a comparison fail. Cleaning works on those stored characters; changing the font or clearing cell formats leaves them in place.

Start with ordinary spaces

TRIM(text) removes ordinary spaces at the ends and reduces runs between words to one space. =TRIM(" Lisbon Office ") returns “Lisbon Office”. LEN falls from 18 to 13. TRIM preserves word separation; it does not remove every space. For a code that needs no spaces, =SUBSTITUTE(A2," ","") changes “AB 12 CD” to “AB12CD”.

Excel's ordinary space has character code 32. A nonbreaking space, commonly copied from a web page, has code 160 and can look the same. TRIM does not remove it. Replace it first:

=TRIM(SUBSTITUTE(A2,CHAR(160)," "))

SUBSTITUTE changes each nonbreaking space to an ordinary one. TRIM can then remove extra spaces without joining words together.

Decide what a line break means

CLEAN(text) removes control characters with codes 0–31, including the line feed made by CHAR(10). It does not remove the nonbreaking space or every other invisible character; code 127, for example, survives CLEAN.

CLEAN deletes a line break without inserting a space. If a cell contains “Main Street” on one line and “Unit 4” on the next, CLEAN gives “Main StreetUnit 4”. When the break separates words, replace it with a space:

=TRIM(SUBSTITUTE(A2,CHAR(10)," "))

If other control characters also need removal, run CLEAN after that replacement and before TRIM. The order preserves the word boundary before the line feed can be deleted.

For pasted text whose control characters should simply be removed, a common combination is =TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," "))). Work from the innermost function outward: replace nonbreaking spaces, delete control characters, then tidy ordinary spaces. TRIM goes last because earlier steps can leave spaces at the ends.

Find out why a value still differs

Compare =LEN(A2) with =LEN(TRIM(A2)). A smaller result after TRIM confirms extra ordinary spaces. If the lengths stay equal but a match still fails, inspect a suspect edge character with =CODE(LEFT(A2)) or =CODE(RIGHT(A2)). A result of 160 identifies a nonbreaking space at that edge. A length check shows that characters changed, but comparing the cleaned words with the original also checks that useful separation was preserved.

Keep the original while cleaning

Put the formula in a helper column: for example, enter =TRIM(A2) in B2 and fill down. A formula cannot replace the cell it reads from. After checking the results, copy the cleaned values and use Paste Special > Values to replace the originals. This writes the result text into the cells instead of leaving formulas that depend on the source column.

Key Takeaways

  • TRIM handles extra ordinary spaces and keeps one between words.
  • Replace nonbreaking spaces before applying TRIM.
  • CLEAN deletes line feeds; replace them with spaces first when they separate words.
  • Diagnose lengths and edge character codes, then clean in a helper column.

2.2 Replace characters and control capitalization

Replacement formulas make a new text value while leaving the source cell available. Choose whether the target is identified by its characters or by its position, then apply any needed case rule.

Replace a match or replace a position

SUBSTITUTE(text,old_text,new_text,[instance_num]) matches a piece of text. With no instance number it changes every occurrence. =SUBSTITUTE("2025.03.14",".","-") returns “2025-03-14”. Adding a fourth argument of 2 changes only the second period, giving “2025.03-14”.

Use empty text to delete a match. =SUBSTITUTE("AB-12-CD","-","") returns “AB12CD”. =SUBSTITUTE("12.5 kg"," kg","") returns “12.5”, still as text. Wrap it in VALUE if it must become a number.

REPLACE(old_text,start_num,num_chars,new_text) selects characters by position. =REPLACE("INV-2025-00042",5,4,"2026") changes the four-character year field. It does not look for the old year. Both functions leave the source intact; the Find and Replace command, Ctrl+H, edits the selected cells themselves.

Several changes can be nested. In =SUBSTITUTE(SUBSTITUTE(A2,"(",""),")",""), the inner function removes opening parentheses and the outer one removes closing parentheses. An entry of “(remote)” becomes “remote”.

Match case deliberately

SUBSTITUTE is case-sensitive: replacing “Ltd” in “Ltd. LTD ltd” changes only the first occurrence. Standardize case first when all variations should be treated alike, or use a separate replacement for each spelling.

UPPER(text) capitalizes letters, and LOWER(text) makes them lowercase. They leave digits and punctuation alone. Use UPPER for a code such as “ab-4471”, which becomes “AB-4471”, or LOWER to make a consistent display of “Ana.Lopez@Example.com”.

PROPER(text) uppercases the first letter of each word and letters after nonletters, then lowercases the others. It turns “mARIA sILVA” into “Maria Silva” and “o'neill” into “O'Neill”. It also changes “McDonald” to “Mcdonald”, “iPhone” to “Iphone”, and “USA office” to “Usa Office”. Review names, brands and abbreviations instead of assuming their preferred capitalization follows that pattern.

For a case-sensitive comparison, use EXACT(text1,text2). =EXACT("ABC","abc") returns FALSE, while ="ABC"="abc" returns TRUE. EXACT checks the characters and their case, which is useful when validating a standardized result.

Count a character by removing it

For “red,green,blue” in A2, =LEN(A2)-LEN(SUBSTITUTE(A2,",","")) returns 2. Each removed comma shortens the string by one, so a simple nonempty comma-separated list has three items.

A word count based on spaces first needs TRIM: =LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1. This gives 2 for “Lisbon Office”. On empty text it gives 1 because of the final addition, so test for an empty cleaned string before using the result as a word count.

Key Takeaways

  • SUBSTITUTE changes matching text; REPLACE changes characters at a position.
  • An omitted SUBSTITUTE instance number changes every exact match.
  • UPPER and LOWER preserve punctuation and digits.
  • PROPER needs review for names, brands and abbreviations.
  • EXACT compares capitalization as well as characters.
  • A length difference counts removed single characters; blank word counts need separate handling.
3

Join and split text

A label may need values from several cells, while an imported record may need to become several fields. Joining and splitting both depend on separators, empty fields and stored data types. Choose how missing pieces should behave, preserve codes with leading zeros, and leave enough worksheet space for the output. Some methods write a fixed result; formulas keep the result linked to its source.

3.1 Build labels from separate values

Joining values produces one text result. You control the order and supply any spaces or punctuation that the result needs. This is useful for labels, initials and addresses assembled from separate fields.

Put the pieces in order

The ampersand operator, &, joins values. With “Maria” in A2 and “Silva” in B2, =A2&B2 gives “MariaSilva”. Insert a quoted space between the references: =A2&" "&B2 gives “Maria Silva”. Reordering the pieces gives another display: =B2&", "&A2 returns “Silva, Maria”.

Quotation marks distinguish literal text from references and function names. The comma and space inside ", " are part of the result. The commas between function arguments are part of the formula's syntax.

CONCAT(text1,[text2],…) performs the same kind of join in Excel 2019 and later, including Microsoft 365. It can take a whole range: =CONCAT(A2:C2) joins the three stored values without separators. To add a separator, include it explicitly, such as =CONCAT(A2," ",B2). The older CONCATENATE function needs the cells listed separately instead of taking a range this way.

In Google Sheets, CONCAT takes exactly two values. For more pieces use &, CONCATENATE or TEXTJOIN. A formula that relies on Excel's range-taking CONCAT behavior therefore needs a different form in Sheets.

Shape a piece before joining it

A function's output can be one piece in a join. =LEFT(A2)&LEFT(B2) returns the initials “MS”. =LOWER(A2&"."&B2)&"@example.com" produces “maria.silva@example.com”. The inner join supplies the name, LOWER changes its case, and the final join adds the domain.

Joining is not addition: =1&2 returns the text “12”, not the number 3. The result is text even if every piece began as a number.

Keep a formatted value readable

Joining reads stored values and does not copy their cell formats. If B2 stores 0.25 but displays 25%, ="Discount: "&B2 gives “Discount: 0.25”. Use ="Discount: "&TEXT(B2,"0%") to obtain “Discount: 25%”. A date also needs TEXT to avoid showing its serial number inside a label.

Fixed-width codes work the same way: ="SKU-"&TEXT(7,"000") gives “SKU-007”. Keep the original numeric value separately when you still need it for calculations.

Handle line breaks and missing pieces

=A2&CHAR(10)&B2 joins the two pieces with a line feed inside one cell. Turn on Wrap Text in Excel to display them on separate lines.

An empty middle field does not remove surrounding separators. With “Maria” in A2, an empty B2 and “Silva” in C2, =A2&" "&B2&" "&C2 gives two spaces between the names. TRIM can tidy those ordinary spaces. When a range has optional pieces, TEXTJOIN gives direct control over whether empty cells keep a place.

Key Takeaways

  • Add every required separator explicitly when joining with & or CONCAT.
  • Excel CONCAT accepts ranges; Google Sheets CONCAT takes two values.
  • Joining creates text and reads stored values without their cell formats.
  • Use TEXT for formatted pieces and CHAR(10) for a line break.

3.2 Join a list and decide what empty cells mean

TEXTJOIN puts the same separator between values. It is useful when a range contains an address, a list of locations or several optional fields. The empty-cell setting determines whether missing pieces disappear or keep their place.

Choose the separator and empty-cell rule

Use TEXTJOIN(delimiter,ignore_empty,text1,[text2],…). With “Lisbon”, an empty cell, “Porto” and “Faro” in A2:A5, =TEXTJOIN(", ",TRUE,A2:A5) returns “Lisbon, Porto, Faro”. The delimiter includes a comma and a space; both appear between neighboring retained values.

Set ignore_empty to FALSE to keep the empty cell's position. =TEXTJOIN(", ",FALSE,A2:A5) gives “Lisbon, , Porto, Faro”. That behavior is useful for a record whose fields must stay in a fixed order. Skipping the second field would shift the meaning of the later pieces.

Output neededDelimiter
A readable list", "
A semicolon-separated line"; "
No gap between values""
One value per line in a cellCHAR(10)

Use Wrap Text to display line-feed separators in Excel. A vertical-bar separator such as “ | ” is another readable choice when the values contain commas.

Combine ranges and individual pieces

TEXTJOIN accepts ranges, single cells and literal values together. =TEXTJOIN("-",TRUE,"INV",2025,"00042") returns “INV-2025-00042”. The quoted final piece keeps its zeros. For an address in A2:D2, =TEXTJOIN(", ",TRUE,A2:D2) skips an unused address line without leaving doubled comma separators.

TRUE skips genuinely empty cells and formulas that return "". A cell holding one ordinary space is not empty. It remains in the list and can create a visible gap. Clean the source with TRIM when those spaces are unwanted; changing ignore_empty does not remove characters from a nonempty value.

Format dates or percentages before joining

Like the ampersand, TEXTJOIN reads stored values. A date can appear as its day serial number and a percentage as a decimal fraction. For a label in A2 and a date in B2, =TEXTJOIN(" ",TRUE,A2,TEXT(B2,"yyyy-mm-dd")) supplies a readable date as the second piece.

TEXTJOIN is available in Excel 2019 and later, including Microsoft 365 and Excel for the web, and in Google Sheets. Its result must fit the Excel cell limit of 32,767 characters; a longer joined result returns #VALUE!.

Join only the rows that meet a condition

FILTER can first select values, and TEXTJOIN can then assemble the selected list. =TEXTJOIN(", ",TRUE,FILTER(A2:A20,B2:B20="North")) lists the names whose team is “North”. FILTER supplies the matching names as a collection; TEXTJOIN handles their presentation in a single cell. This is a different task from joining every name and expecting the separator to filter the list.

Key Takeaways

  • TEXTJOIN inserts a delimiter between retained values.
  • TRUE skips empty values; FALSE preserves their positions.
  • A space is a character, so a space-only cell is not empty.
  • Format numeric and date pieces with TEXT.
  • FILTER can select the values before TEXTJOIN combines them.

3.3 Split an imported column with the wizard

Text to Columns turns one selected column into several columns of fixed values. It suits a one-time import with a clear separator or fields that always occupy the same positions. Prepare enough empty columns for the result before starting.

Split at separators

For “Silva,Maria,Lisbon” in A2:

  1. Select the source column and choose Data > Text to Columns.
  2. Select Delimited, then Next.
  3. Choose Comma and check the Data preview. It should show three fields.
  4. Select Next and choose the data format for each output column.
  5. Set the destination cell and select Finish.

The three fields become “Silva”, “Maria” and “Lisbon” in neighboring columns. The separator is not part of any output field. Other choices include a tab, space, semicolon or another delimiter you enter.

Repeated separators need a decision. Treat consecutive delimiters as one makes a run of spaces a single split point. Keep that option off when repeated delimiters represent a missing field that must keep its position.

A text qualifier, usually the double quotation mark, protects a separator inside a field. For the record "Lisbon, Portugal",120, the quoted place name stays together while the comma outside the quotes separates the quantity. Check the preview to see which commas will split the record.

Choose types before finishing
Column formatEffect
GeneralConverts number-like and date-like pieces when recognized
TextKeeps the characters, including leading zeros
DateReads a date using the chosen MDY, DMY or YMD order
Do not import column (skip)Leaves that field out

Set a code column to Text before selecting Finish. Under General, “00042” becomes the number 42. Applying a display format afterward does not recover the original text field from an unknown code length. For dates, choose the order used by the input, not the order you happen to prefer on screen.

Split fields of fixed width

Choose Fixed width when every field has the same character count. In “2025031400042”, the first eight characters are the date and the last five are an order code. Put a break line after position 8. Set the first output to Date with YMD order and the second to Text. The result is March 14, 2025 and “00042”. A comma delimiter would do nothing to this record because it has no comma.

Protect the source and nearby cells

The default destination is the selected cell, so finishing there replaces the source. Later fields extend into columns to the right. Choose an empty destination or insert empty columns if the source or neighboring values must remain. Excel asks before overwriting existing data; inspect that message before proceeding.

These outputs do not update when the original changes. New imports need the split again. In Google Sheets, Data > Split text to columns detects or lets you choose the separator and also writes fixed values into the columns to the right.

Key Takeaways

  • Delimited splits at separators; Fixed width splits at marked positions.
  • Use the preview to check repeated delimiters and quoted fields.
  • Choose Text for identifiers and the input order for dates.
  • Set an empty destination wide enough for every field.
  • The wizard creates fixed values that must be recreated after source changes.

3.4 Split with a formula that updates

TEXTSPLIT creates several pieces from one text value and updates them when that value changes. It is available in Excel for Microsoft 365 and Excel 2024.

Choose columns, rows or both

The syntax is TEXTSPLIT(text,col_delimiter,[row_delimiter],[ignore_empty],[match_mode],[pad_with]). =TEXTSPLIT("Silva,Maria,Lisbon",",") places the three text fields side by side. The column delimiter divides fields across the sheet.

A row delimiter starts another row. =TEXTSPLIT("Tea,2;Coffee,5",",",";") makes two rows: “Tea” and “2” in the first, “Coffee” and “5” in the second. For a single vertical list, leave the column delimiter argument empty: =TEXTSPLIT(A2,,", ") splits at each whole comma-and-space separator down the sheet.

The results spill from the formula cell into neighboring cells. Only the first cell contains the formula. A nonempty cell in the required area produces #SPILL!; clear the obstruction or move the formula to a suitable empty area. Editing separate spill results is not how you change the rule.

Control the split details

Several delimiters can be supplied as an array constant: =TEXTSPLIT("red;green,blue",{",",";"}) returns three pieces. The braces group alternative separators.

The optional arguments solve different problems:

ArgumentDefaultChange when needed
ignore_emptyFALSETRUE drops empty pieces between repeated delimiters
match_mode0, case-sensitive1 also matches different capitalization
pad_with#N/AAnother value fills missing fields in uneven rows

For “red,,blue”, the default keeps an empty field between the two colors. With =TEXTSPLIT(A2,",",,TRUE) it is dropped. For “10x20X30”, a delimiter of "x" leaves “20X30” together by default; =TEXTSPLIT(A2,"x",,,1) matches both cases.

Uneven rows are a separate issue. =TEXTSPLIT("Tea,2;Coffee",",",";") pads the missing second field of the Coffee row with #N/A. =TEXTSPLIT("Tea,2;Coffee",",",";",,,"") displays empty text there. The omitted argument positions still need commas so the final value reaches pad_with.

Convert pieces used for arithmetic

Split results are text even when they contain only digits. =SUM(TEXTSPLIT("10,20,30",",")) returns 0 because SUM skips those text values. =SUM(VALUE(TEXTSPLIT("10,20,30",","))) returns 60. A double minus can also convert number-like pieces; keep identifiers as text when their zeros matter.

Google Sheets uses SPLIT(text,delimiter,[split_by_each],[remove_empty_text]). Its defaults differ: each delimiter character is a separate split point, and empty pieces are removed. =SPLIT("Anne-Marie - Sales"," - ",FALSE) treats the whole “ - ” as one separator and keeps “Anne-Marie” together. Omitting FALSE splits at spaces and hyphens, giving “Anne”, “Marie” and “Sales”.

Key Takeaways

  • TEXTSPLIT spills into columns, rows or a grid from one formula cell.
  • A blocked output area produces #SPILL!.
  • ignore_empty, match_mode and pad_with control different parts of the result.
  • Convert text pieces before summing numeric data.
  • Google Sheets SPLIT has different delimiter and empty-field defaults.
4

Convert between numbers, dates and text

Numbers and dates can be stored as values or as text that looks like those values. The distinction matters when you total a column, build a readable label or match an imported code. Formatting changes how a numeric value looks; conversion changes its type. Use format codes for presentation and conversion functions for calculations, with the input separators and date order clearly identified.

4.1 Format a value inside a text label

TEXT(value,format_text) creates a text version of a number or date. Use it when a value becomes part of a label, sentence or code. Keep the original value for calculations, sorting and charts.

Read a number format code

Put the format code in straight quotation marks. A 0 requires a digit at that position, and # shows a digit only when needed. In English (United States) settings, a period marks the decimal point and a comma groups thousands.

FormulaText result
=TEXT(1234.567,"#,##0.00")“1,234.57”
=TEXT(1234.567,"0")“1235”
=TEXT(0.285,"0.0%")“28.5%”
=TEXT(42,"00000")“00042”

TEXT rounds the displayed digits to the precision in the code. The percent code multiplies by 100 for display and adds the percent sign. Leading zeros create a fixed-width text code: ="SKU-"&TEXT(7,"000") gives “SKU-007”.

Format dates and times

A date is stored as a day serial number. Joining it directly to words can expose that number. If B2 holds March 14, 2025, ="Due "&TEXT(B2,"mmmm d, yyyy") gives “Due March 14, 2025”.

Date codes use d or dd for a numeric day, ddd for a short weekday and dddd for the full weekday. Months use m, mm, mmm or mmmm for the number or name. Use yy or yyyy for the year. For that date, =TEXT(B2,"yyyy-mm-dd") gives “2025-03-14”, and =TEXT(B2,"ddd d mmm") gives “Fri 14 Mar”.

Times are fractions of a day. The value 0.75 is 18:00: =TEXT(0.75,"hh:mm") returns “18:00”, while =TEXT(0.75,"h:mm AM/PM") returns “6:00 PM”. Use h or hh for hours and ss for seconds. The code mm means minutes after an hour code or before a seconds code; in a date code it means the month.

Choose text or a cell format

A number format changes the display while leaving the cell numeric. TEXT makes a separate text value, which SUM skips when reading a range. Use cell formatting for a column of masses that will be totaled. Use ="Net weight: "&TEXT(1234.5,"#,##0.0")&" kg" for the readable label “Net weight: 1,234.5 kg”.

Rounding in TEXT affects the text result, not the separate source value. A source number can retain more precision than the label shows. Calculate from the numeric source so that a presentation choice does not replace your calculation data.

Format codes and date names follow the program's language and regional settings. English uses yyyy for the year; German Excel uses JJJJ. Month and day names can change too. Check these label results when a workbook will be opened under other settings.

Key Takeaways

  • TEXT returns text; cell formatting leaves the value numeric.
  • Use 0 for required digits and # for optional digits.
  • Date and time codes control labels built from serial values.
  • Keep numeric sources for calculation and check localized format codes.

4.2 Turn imported numeric text into usable values

An entry can look numeric while being stored as text. That affects totals, sorting and matches. Decide whether the entry represents a quantity or an identifier before converting it.

Recognize numeric text

Text is left-aligned by default, and Excel may show a green triangle with “Number Stored as Text”. Alignment is a clue, not a type test, because cell formatting can change it. =ISTEXT(A2) identifies a text value; =ISNUMBER(A2) identifies a number.

Suppose A2:A4 contain the number 10, the text “20” and the number 30. =SUM(A2:A4) gives 40, =COUNT(A2:A4) gives 2 and =COUNTA(A2:A4) gives 3. SUM and COUNT skip the numeric text in that range, while COUNTA counts the nonempty entry.

Imports, web pastes, Text-formatted cells and a leading apostrophe can all create numeric text. Extraction functions and TEXT also produce text results, even when the visible characters are digits.

Convert recognized text

VALUE(text) reads text in a numeric, date or time format the program recognizes. With English (United States) settings, =VALUE("1,234.50") returns 1234.5 and =VALUE("12%") returns 0.12.

Remove unit labels before conversion. For “12.5 kg” in A2, use =VALUE(SUBSTITUTE(A2," kg","")). SUBSTITUTE first leaves “12.5”; VALUE then makes it numeric. VALUE applied directly to the unit-bearing string returns #VALUE!.

Arithmetic can also convert number-like text. =--A2, =A2*1 and =A2+0 turn the text “20” into the number 20. If A2 is 10 and A3 is the text “20”, =A2+A3 returns 30 but =SUM(A2:A3) returns 10. The operator converts its text operand; SUM does not convert text cells in the range.

Read separators and dates correctly

Excel's NUMBERVALUE(text,decimal_separator,group_separator) lets you name the input convention. =NUMBERVALUE("1.234,5",",",".") returns 1234.5. The second argument identifies the decimal comma and the third identifies the thousands period. If these arguments are omitted, the current settings supply them.

Date text must be interpreted before a date display format can help. “03/04/2025” means March 4 under US settings and April 3 under day-first settings. In the English settings used here, =VALUE("2025-03-14") gives 45730; apply a date format to display March 14, 2025. For a one-time imported date column, Text to Columns lets you explicitly choose the input date order.

Keep codes as codes

Converting “00042” to a number gives 42. Keep identifiers such as postal codes, phone numbers and product codes as text when they are not used as quantities. A custom numeric format of 00000 can display a number with zeros, but the stored number remains 42. TEXT instead makes the text value “00042”.

Text sorting compares characters, so “100” comes before “25”. A numeric lookup key can also fail to match its text counterpart. Make the types agree before matching. For a fixed one-time conversion, Excel's warning menu offers Convert to Number, and Text to Columns with General can convert a numeric-text column.

Key Takeaways

  • ISTEXT and ISNUMBER test stored types; display alignment is only a clue.
  • VALUE converts recognized numeric text, and unit labels must be removed first.
  • NUMBERVALUE explicitly names the input decimal and grouping separators.
  • Date interpretation depends on the input order and regional settings.
  • Keep identifiers as text when leading zeros carry meaning.
  • Matching numeric keys requires matching data types.
5

Fill patterns with Flash Fill and choose the right method

Examples can be the quickest way to show a text transformation, but a guessed pattern still needs checking. Flash Fill is useful for a one-time task, while formulas suit data that changes and rules that others must inspect. Compare these choices with Text to Columns, then finish the output by checking unusual rows, keeping needed data types and preserving values before removing source columns.

5.1 Show Flash Fill the pattern you want

Flash Fill learns a pattern from examples typed beside the data. It can extract a name, assemble initials, remove separators or rearrange a code. It writes the results as fixed values, so the examples and the finished column need checking.

Establish the pattern

In Excel, put the output column directly next to the data. If A2 contains “Maria Silva”, type “Maria” in B2 and press Enter. Select the next cell down, then choose Data > Flash Fill or press Ctrl+E on Windows. Excel fills the column using the pattern it inferred.

If automatic Flash Fill is enabled, typing the next example may show a gray preview. Press Enter to accept it. On Windows, the setting is under File > Options > Advanced > Automatically Flash Fill. The manual command works even when no preview appears.

Flash Fill can combine several source columns. With “Silva” in A2 and “Maria” in B2, type “M. Silva” in C2. The rule can produce “J. Okafor” from a later row containing “Okafor” and “John”. The typed example tells Excel both which pieces to use and how to punctuate them.

Give examples that separate possible rules

One output can fit several patterns. From a short name, Excel might infer “first word” when you meant “all given names”. Include a row with a middle name to show the intended difference. If a later result is wrong, replace it with the correct output and run Flash Fill again. A second or third varied example helps resolve the ambiguity.

Check the output against the actual source, especially rows with extra or missing name parts, spaces, blank cells or unusual separators. A column full of plausible-looking values is not a check that the intended rule was followed. Flash Fill gives no error message when its guessed pattern produces a wrong but valid text value.

Check a specific extraction rule

For a task that requires exactly the characters before the first space in A2, compare the filled B2 with a formula result:

=IFERROR(EXACT(B2,LEFT(A2,FIND(" ",A2)-1)),FALSE)

FIND locates the space and LEFT takes the expected piece. EXACT checks case as well as characters. IFERROR returns FALSE when a row lacks the required space. Fill the check down and review FALSE rows against the source. The check verifies that particular first-space rule; choose a check that matches the output your task actually requires.

Know what stays after filling

Flash Fill results have no live formula linking them to the source. Changing “Maria Silva” afterward does not change the filled output. New rows need another fill, and the inferred rule is not recorded as a formula in the sheet. Choose a formula for a column that needs to track future edits.

Google Sheets offers Smart Fill. Type a few examples and accept its suggestion with Ctrl+Shift+Y on Windows or ChromeOS, or Cmd+Shift+Y on Mac. Smart Fill can put a formula into the filled cells; click a result to inspect the formula it used.

Key Takeaways

  • Type an example beside the source, then run Flash Fill.
  • Use varied examples to clarify an ambiguous pattern.
  • Inspect exceptional rows and check results against the intended rule.
  • Flash Fill writes fixed values; Smart Fill can supply formulas.
  • Source edits and new rows require a fresh Flash Fill operation.

5.2 Choose a method and finish the column

The best text tool depends on what the output must do after today's cleanup. A quick one-time transformation and a column that follows ongoing edits have different needs.

Match the method to the work
RequirementSuitable methodReason
Recalculate after source editsFormulaReferences keep the output linked to the source
Split a one-time import with clear field boundariesText to ColumnsThe preview and per-column formats control the import
Reshape a one-time list from easy examplesFlash FillExamples can show a pattern that is awkward to write
Let someone inspect the rule laterFormulaThe cell records the calculation

For new rows, fill the formula down as the data grows. Text to Columns and Flash Fill write fixed values, so repeat the operation when the import or row set changes. Neither records a live calculation in the resulting cells.

Compare two ways to rearrange a name

An export stores “Silva, Maria” in A2, and a form needs “Maria Silva”. A formula can find the comma, take everything after it, tidy the leading space and append the surname:

=TRIM(MID(A2,FIND(",",A2)+1,LEN(A2)))&" "&LEFT(A2,FIND(",",A2)-1)

FIND returns 6. MID begins at 7 and returns “ Maria”; TRIM makes that “Maria”. LEFT takes the five characters before the comma, “Silva”. The join inserts one space. The formula updates when A2 changes to another entry with that layout.

For a one-time column, type “Maria Silva” beside the source and run Flash Fill. Inspect other rows to make sure the guessed rule rearranges the intended fields, including multiword names. Text to Columns is another useful choice when separate surname and given-name fields are the desired result, especially if the import also needs explicit data types.

Check which program will calculate the formulas

TEXTSPLIT, TEXTBEFORE and TEXTAFTER require Excel for Microsoft 365 or Excel 2024. Older Excel versions cannot calculate them and may show #NAME?. LEFT, RIGHT, MID, LEN, FIND, SEARCH, SUBSTITUTE, TRIM and TEXT work in current Excel versions and Google Sheets. Sheets has its own SPLIT behavior and a two-value CONCAT, so check those formulas when moving a workbook between programs.

Preserve results before removing sources

Build transformations in helper columns and compare the results with the originals. If the source must be deleted, first copy the formula results and use Paste Special > Values in their place. The output then holds fixed values. Deleting referenced columns while formulas still depend on them can produce #REF!.

Filter the finished output for errors and unexpected blanks. Use =ISNUMBER(B2) to verify a converted quantity. To inspect unusually short or long text, add =LEN(B2) in a helper column and sort the whole record range by that length. Alphabetical sorting orders characters, not lengths; sorting only one column can separate a value from the rest of its record.

Key Takeaways

  • Use formulas for changing data or an inspectable rule.
  • Text to Columns controls field boundaries and output types for a fixed import.
  • Flash Fill suits a checked one-time pattern transformation.
  • Paste results as values before deleting their source columns.
  • Check types, errors, blanks and unusual lengths before finishing.

Text Functions examples

5 Walkthroughs

1

Extract the right field from each row

14 steps
Build an extraction from character counts and separator positions, then check rows with a different layout.
  1. 1
    IntroductionFind a field’s boundaries

    A text field can be selected by its position or by the separators around it. A fixed layout makes position formulas quick (MID takes characters from a start position). When field lengths vary, a search with FIND must locate the boundaries in each row, so one formula keeps working.

    Start with the code “JOB-86-0049” in A2. The aim is to understand how a formula selects a piece, so the same method can work on a shorter or longer code.

  2. 2
    ExplanationCount every character

    The code “JOB-86-0049” has 11 characters. The first hyphen is at position 4 and the second at 7. Digits and separators each occupy a position.

    =LEN(A2) returns 11. LEN measures the text; it does not locate a particular field. When a result has an unexpected extra character, check whether a separator or invisible space was included.

  3. 3
    ExampleTake a piece at a fixed position

    The middle field “86” starts at position 5 and has two characters. Enter =MID(A2,5,2).

    MID’s second argument chooses the first character to keep. Its third argument is the number of characters to take, so it takes positions 5 and 6. =RIGHT(A2,4) takes “0049” from the end. Both results are text, preserving the code’s leading zeros.

  4. 4
    ChallengeCheck the start position

    A2 contains “JOB-86-0049”. A formula uses =MID(A2,4,2). What does it return, and what start position gives the middle field?

    ---reveal---

    It returns “-8” because position 4 is the first hyphen. Change the start to 5 to take “86”. The count stays 2; changing the start fixes the included separator without changing the field length.

  5. 5
    ExplanationLet FIND locate the boundary

    Enter =FIND("-",A2). The result is 4, the first hyphen’s position. FIND returns a number that another function can use.

    To find the second hyphen, start after the first: =FIND("-",A2,FIND("-",A2)+1). The inner search returns 4, the next search begins at 5, and its result is 7. Numbering still begins at the original string’s first character.

  6. 6
    ConnectionChoose how case should match

    A punctuation search works the same with FIND or SEARCH, but a letter search may not. FIND requires the same capitalization. SEARCH ignores case and accepts ? for one character or * for a sequence.

    For “Job-86-0049”, =SEARCH("job",A2) returns 1, while =FIND("job",A2) gives #VALUE!. Use a tilde before a SEARCH wildcard when the punctuation itself is the target.

  7. 7
    ChallengeTurn a search into a test

    An order note in A2 may contain “rush” in any capitalization, or may omit it. What formula returns TRUE for a match and FALSE otherwise?

    ---reveal---

    =ISNUMBER(SEARCH("rush",A2)) does this. SEARCH supplies a numeric position when it finds a match, and ISNUMBER turns that into TRUE. A failed search gives FALSE through the wrapper. The test also matches the letters inside a longer word.

  8. 8
    ExampleKeep the field before a separator

    For a first-field extraction, subtract 1 from the first hyphen’s position: =LEFT(A2,FIND("-",A2)-1).

    On “JOB-86-0049”, FIND returns 4, so LEFT takes three characters: “JOB”. On “PO-7-62”, FIND returns 3, so LEFT takes two: “PO”. The formula adapts because the count comes from the actual separator position in each row.

  9. 9
    ExampleWork out the middle field’s length

    Keep the original “JOB-86-0049” in A2. Put the first hyphen position in B2 with =FIND("-",A2) and the second in C2 with =FIND("-",A2,B2+1).

    Now enter =MID(A2,B2+1,C2-B2-1). The start is 5 and the count is 2, so the result is “86”. The subtraction excludes both surrounding hyphens; the second position itself is not a character count.

  10. 10
    Key InsightHelpers make nesting readable

    The helper cells expose the intermediate positions. If B2 or C2 is wrong, the extraction cannot be right, even if one sample result looks plausible.

    When the positions are checked, the formula can be nested. The first FIND supplies the start plus 1; the second supplies the later boundary. Keeping the helper columns is also useful when someone else needs to understand or maintain the rule.

  11. 11
    TipCheck what a name field means

    A first-space rule splits “Lina Costa” into “Lina” and “Costa”. Applied to “Lina Maria Costa”, it splits into “Lina” and “Maria Costa”. That is a correct first-space split, but the second output is not necessarily the surname field you intended.

    Define the required output before applying the formula to names. Include rows with multiple parts and clean leading spaces before locating the boundary.

  12. 12
    ChallengeAdapt to a shorter code

    A2 now contains “PO-7-62”. B2 holds the first hyphen’s position and C2 the second’s. What start and count extract the middle field, and what text is returned?

    ---reveal---

    B2 is 3 and C2 is 5. Start at B2+1, position 4, and take C2−B2−1, one character. =MID(A2,B2+1,C2-B2-1) returns “7” as text. Reusing the fixed start 5 would begin at the second hyphen.

  13. 13
    TipChoose a missing-separator result

    A missing separator makes FIND fail. If a one-part name should be kept unchanged, use =IFERROR(LEFT(A2,FIND(" ",A2)-1),A2).

    In Microsoft 365 and Excel 2024, TEXTBEFORE and TEXTAFTER offer shorter separator-based extractions. Their missing-separator error is #N/A unless an if_not_found value is supplied. Choose a fallback that expresses the intended treatment of the row.

  14. 14
    RecapCheck an extraction before filling down

    Check the start position, the character count and the output type separately. Test one row whose field lengths differ from the first, and one row without the expected separator.

    A correct result on both ordinary and exceptional rows gives useful evidence that the formula implements the intended layout. A digit-only result remains text until you deliberately convert it.

2

Clean a pasted label without losing words

12 steps
Diagnose spaces and line breaks, choose replacements, and verify capitalization.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionInspect the stored characters
  2. 2
    ExampleTidy ordinary spaces
  3. 3
    ExplanationReplace the space TRIM leaves
  4. 4
    ExampleKeep words apart across a line break
  5. 5
    ChallengeChoose a cleanup sequence
  6. 6
    ExplanationReplace a match or a location
  7. 7
    ChallengeChange just one repeated separator
  8. 8
    TipReview the case rule’s output
  9. 9
    Key InsightChoose a comparison that checks case
  10. 10
    ExampleCount the deleted separators
  11. 11
    ChallengeFind the missing case change
  12. 12
    RecapReplace originals after checking
3

Build and split a compact record

18 steps
Control separators, optional fields, imported types and formula spill results.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionDecide where each field belongs
  2. 2
    ExampleWrite the punctuation into the join
  3. 3
    ConnectionFormat a number before it joins words
  4. 4
    ChallengeBuild an initial and surname label
  5. 5
    ExampleSkip an unused address field
  6. 6
    TipA space is not an empty field
  7. 7
    ChallengeKeep the missing field’s position
  8. 8
    ExplanationPreview a one-time split
  9. 9
    ExampleKeep a quoted comma inside a field
  10. 10
    ChallengeSplit a record with fixed widths
  11. 11
    ExplanationGive the formula room to spill
  12. 12
    ExampleMake columns and rows together
  13. 13
    ExampleDistinguish an empty piece from padding
  14. 14
    ChallengeSplit and total numeric pieces
  15. 15
    ConnectionCheck the Sheets delimiter rule
  16. 16
    TipPut optional settings in the right position
  17. 17
    ChallengePreserve a three-field record through both operations
  18. 18
    RecapCheck the shape and types
4

Keep numeric values and readable labels

11 steps
Format labels with TEXT, diagnose numeric text, and convert imported quantities without damaging identifiers.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionSeparate presentation from calculation
  2. 2
    ExampleMake a readable mass label
  3. 3
    ExplanationChoose required and optional digits
  4. 4
    ExampleRead date and time codes
  5. 5
    ChallengeKeep a total numeric
  6. 6
    ExampleDiagnose a missing quantity
  7. 7
    ExampleRemove the unit before conversion
  8. 8
    ChallengeRead another decimal convention
  9. 9
    TipKeep date order and identifiers distinct
  10. 10
    ChallengeRepair a mixed import
  11. 11
    RecapCheck the representation the next task needs
5

Fill a pattern and choose a lasting method

11 steps
Use checked examples for Flash Fill, then decide whether the output should remain linked to its source.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionPlan for what happens after the fill
  2. 2
    ExampleShow an initial and surname pattern
  3. 3
    TipUse an example that distinguishes the rule
  4. 4
    ChallengeRespond to an incorrect fill
  5. 5
    ConnectionInspect whether a formula was created
  6. 6
    ExplanationMatch the method to future edits
  7. 7
    ExampleRecord a rearrangement as a formula
  8. 8
    ChallengeChoose for a recurring import
  9. 9
    TipMake a fixed handoff independent
  10. 10
    ChallengeFinish a checked output safely
  11. 11
    RecapDecide and verify before the handoff

Text Functions practice questions

40 Practice Questions in 4 sets

Set 1: Apply extraction, splitting and conversion rules10 Practice Questions

Question 1 of 10

A2 contains “PT-903-X”. What text does =MID(A2,4,3) return?
  1. “-90”
  2. “903”
  3. “03-”
  4. “903-X”
Show answerHide answer
Answer: B
Position 4 is the digit 9, after the two-letter prefix and hyphen. MID takes three characters beginning there, so it returns “903”. “-90” would come from starting at position 3 and including the separator; the final argument is a count, not an ending position.

Question 2 of 10

A2 contains “DEP-7-0083”. B2 contains =FIND("-",A2) and C2 contains =FIND("-",A2,B2+1). What single formula returns the numeric middle field and also works when the prefix and middle field have different lengths?
  1. =VALUE(MID(A2,B2,C2-B2-1))
  2. =VALUE(MID(A2,B2+1,C2-B2))
  3. =VALUE(MID(A2,B2+1,C2-B2+1))
  4. =VALUE(MID(A2,B2+1,C2-B2-1))
Show answerHide answer
Answer: D
The start must skip the first hyphen, and the count must stop before the second: B2+1 and C2−B2−1. MID extracts “7”, then VALUE makes it numeric. Taking C2−B2 characters also includes the second hyphen, so the resulting “7-” is not the desired quantity.

Question 3 of 10

In Excel, B2 is =TRIM(A2), but a nonbreaking space at the end of A2 remains. What formula removes it while preserving word separation?
  1. =TRIM(SUBSTITUTE(A2,CHAR(160)," "))
  2. =TRIM(CLEAN(A2))
  3. =SUBSTITUTE(TRIM(A2)," ","")
  4. =CLEAN(SUBSTITUTE(A2,CHAR(32)," "))
Show answerHide answer
Answer: A
Replace the nonbreaking space, code 160, with an ordinary space that TRIM can remove. The replacement also preserves separation if the same character appears between words. CLEAN does not remove code 160, so adding CLEAN to TRIM would leave the stated problem unresolved.

Question 4 of 10

A2:C2 contain “Hub”, a single ordinary space and “Gate”. Why does =TEXTJOIN(", ",TRUE,A2:C2) retain a gap for the middle field?
  1. TRUE preserves every empty field.
  2. A comma delimiter preserves blanks.
  3. The middle value contains a character.
  4. TEXTJOIN adds a space-only field.
Show answerHide answer
Answer: C
The middle cell contains a stored space, so it is not empty and TRUE does not skip it. The comma-and-space delimiter is inserted around that retained value. Changing TRUE to FALSE would preserve empty positions too; it would not remove the space character that caused this gap.

Question 5 of 10

A2:C2 contain “Lima”, an empty cell and “Cusco”. A readable location list should omit the empty field. What formula makes “Lima / Cusco”?
  1. =TEXTJOIN(" / ",TRUE,A2:C2)
  2. =TEXTJOIN(" / ",FALSE,A2:C2)
  3. =CONCAT(A2:C2)
  4. =A2&" / "&B2&" / "&C2
Show answerHide answer
Answer: A
TEXTJOIN supplies the spaced slash between retained values, and TRUE skips the empty middle cell. FALSE preserves that field’s position, giving two delimiters with an empty piece between them. CONCAT would remove the separators entirely, while a fixed join keeps both written separators.

Question 6 of 10

A2 contains “Pens,4;Clips”. A live two-column result must preserve both rows and show empty text for the missing quantity. What formula creates it?
  1. =TEXTSPLIT(A2,",",";",TRUE)
  2. =TEXTSPLIT(A2,",",";",,,"")
  3. =TEXTSPLIT(A2,";",",",,,"")
  4. =TEXTSPLIT(A2,",",,TRUE,1,"")
Show answerHide answer
Answer: B
Commas separate columns and the semicolon starts a new row. The sixth argument supplies empty-text padding for the absent quantity in the Clips row. Setting ignore_empty to TRUE alone does not replace padding in an uneven grid; without pad_with, the missing field receives #N/A.

Question 7 of 10

A column of measured lengths must show one decimal place and remain usable by SUM. What should be changed?
  1. Replace the cells with one-decimal TEXT results.
  2. Join each number to a one-decimal format code.
  3. Change the cells to Text before reentering the numbers.
  4. Apply a one-decimal number format to the numeric cells.
Show answerHide answer
Answer: D
A number format changes the display while keeping each length numeric for SUM. TEXT creates a new text value, which SUM skips when reading a range. The requirement is a numeric column with a chosen display precision, so replacing its stored values with strings would change the wrong thing.

Question 8 of 10

A2 contains the text “6.25 kg”. What formula produces the numeric mass for a calculation?
  1. =VALUE(SUBSTITUTE(A2," kg",""))
  2. =VALUE(A2)
  3. =TEXT(SUBSTITUTE(A2," kg",""),"0.00")
  4. =SUBSTITUTE(A2," kg","")
Show answerHide answer
Answer: A
SUBSTITUTE removes the unit suffix and leaves the numeric text “6.25”; VALUE then converts it to a number. SUBSTITUTE alone still returns text, even though the visible unit is gone. TEXT also returns a text representation, so it does not satisfy the requested numeric output.

Question 9 of 10

A user accepts a Flash Fill column and then edits the original surname in one source row. What happens to that row’s existing filled result?
  1. It recalculates from the changed source.
  2. It keeps its previous fixed value.
  3. It displays #REF! until the fill is rerun.
  4. It becomes a formula using the new surname.
Show answerHide answer
Answer: B
Flash Fill writes values directly into the output cells, without a formula link to the source. Editing the surname therefore leaves the existing result unchanged. Recalculation is the behavior of a formula-based result; a Flash Fill output needs another fill or a direct correction to reflect the edit.

Question 10 of 10

A name display column must track source edits and show a colleague the transformation rule. What method best meets both needs?
  1. Flash Fill from a few examples.
  2. Text to Columns on the names.
  3. A formula in a helper column.
  4. Copying the names as values.
Show answerHide answer
Answer: C
A formula recalculates from its referenced source and can be inspected in the result cell. Fill it down when new rows arrive. Flash Fill can quickly create plausible names, but its fixed results neither follow source edits nor record the inferred rule as a formula for the colleague to inspect.
Set 2: Read text values and build reliable formulas10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

With English Excel settings, what text does =TEXT(74,"00000") return?
  1. “74.000”
  2. “74000”
  3. “00074”
  4. “00000”
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A2 contains the text “BOX-27-0065”. What does =RIGHT(A2,4) return?
  1. The number 65.
  2. The text “-006”.
  3. The text “0065”.
  4. The text “27-0”.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A2 contains “Route READY”. What happens when =FIND("ready",A2) is calculated?
  1. It returns #VALUE!.
  2. It returns position 7.
  3. It returns position 1.
  4. It returns the text “READY”.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

Codes in A2 use one colon, such as “RM:872” and “FLOOR:19”. What formula returns the complete field before the colon on each row?
  1. =LEFT(A2,FIND(":",A2))
  2. =MID(A2,FIND(":",A2)+1,LEN(A2))
  3. =LEFT(A2,FIND(":",A2)+1)
  4. =LEFT(A2,FIND(":",A2)-1)
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

What does =TRIM(" Dock Office ") return in Excel?
  1. “DockOffice”
  2. “Dock Office”
  3. “ Dock Office ”
  4. “Dock Office”
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

What does =SUBSTITUTE("x/x/x","/","-",2) return?
  1. “x-x-x”
  2. “x/x-x”
  3. “x-x/x”
  4. “x/x/x”
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

B2 stores 0.32 and displays 32%. What formula creates the text “Share: 32%” from B2?
  1. ="Share: "&B2
  2. =TEXT("Share: "&B2,"0%")
  3. ="Share: "&TEXT(B2,"0")
  4. ="Share: "&TEXT(B2,"0%")
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A one-time import contains "Osaka, Japan",00752. How should Text to Columns produce one place field and an unchanged code field?
  1. Comma delimiter; no qualifier; code format Text.
  2. Space delimiter; double-quote qualifier; code format Text.
  3. Comma delimiter; double-quote qualifier; code format Text.
  4. Comma delimiter; double-quote qualifier; code format General.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A2:A4 contain the number 9, the text “14” and the number 21. What do SUM and COUNTA return for this range?
  1. SUM returns 44; COUNTA returns 3.
  2. SUM returns 30; COUNTA returns 2.
  3. SUM returns 44; COUNTA returns 2.
  4. SUM returns 30; COUNTA returns 3.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

Flash Fill was meant to take the first word from each full name. A2 contains “Emi Kato” and B2 contains “emi”. Another row contains “Ravi” with no space. What formula check flags both the capitalization difference and the missing separator as FALSE?
  1. =IFERROR(EXACT(B2,LEFT(A2,FIND(" ",A2)-1)),FALSE)
  2. =IFERROR(B2=LEFT(A2,FIND(" ",A2)-1),FALSE)
  3. =IFERROR(EXACT(B2,LEFT(A2,FIND(" ",A2)-1)),TRUE)
  4. =IFERROR(EXACT(B2,LEFT(A2,FIND(" ",A2))),FALSE)
Show answerHide answer

Save this lesson to see this answer.

Set 3: Diagnose errors in text transformations10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Excel joins the values in A2:C2 with =CONCAT(A2:C2). In Google Sheets the same three-cell task must still join every value without a separator. What replacement works?
  1. =A2&B2&C2
  2. =CONCAT(A2:C2)
  3. =CONCAT(A2,B2,C2)
  4. =TEXTJOIN(" ",TRUE,A2:C2)
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A2 contains “ LOT-48-729 ” with ordinary spaces at both ends. The required numeric output is the middle field. What formula handles the spaces and both variable-length boundaries?
  1. =VALUE(MID(TRIM(A2),FIND("-",A2)+1,FIND("-",A2,FIND("-",A2)+1)-FIND("-",A2)-1))
  2. =VALUE(MID(TRIM(A2),FIND("-",TRIM(A2))+1,FIND("-",TRIM(A2),FIND("-",TRIM(A2))+1)-FIND("-",TRIM(A2))-1))
  3. =VALUE(MID(TRIM(A2),FIND("-",TRIM(A2)),FIND("-",TRIM(A2),FIND("-",TRIM(A2))+1)-FIND("-",TRIM(A2))-1))
  4. =VALUE(MID(TRIM(A2),FIND("-",TRIM(A2))+1,FIND("-",TRIM(A2),FIND("-",TRIM(A2))+1)-FIND("-",TRIM(A2))))
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A2 contains “Service” followed by a line feed, then “Desk”, then a nonbreaking space. What formula returns “Service Desk” without joining the words?
  1. =TRIM(SUBSTITUTE(CLEAN(A2),CHAR(160)," "))
  2. =TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," ")))
  3. =TRIM(CLEAN(SUBSTITUTE(SUBSTITUTE(A2,CHAR(10)," "),CHAR(160)," ")))
  4. =CLEAN(TRIM(SUBSTITUTE(A2,CHAR(32)," ")))
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A2 contains “NASA research”. Why does =PROPER(A2) fail to preserve the organization’s preferred capitalization?
  1. It lowercases the later letters of the abbreviation.
  2. It keeps the original case of the abbreviation.
  3. It capitalizes every letter of the second word.
  4. It changes only letters that follow punctuation.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A2 is “Omar”, B2 is empty and C2 is “Said”. What text does =A2&" "&B2&" "&C2 produce?
  1. “Omar Said”, with one space.
  2. “Omar Said”, with two spaces.
  3. “OmarSaid”, with no space.
  4. “Omar Said”, with three spaces.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A one-time import stores every record as six letters followed by four identifier digits, such as “REMOTE0048”. What split preserves the identifier’s form?
  1. Delimited at spaces; identifier format Text.
  2. Fixed width after position 5; identifier format Text.
  3. Fixed width after position 6; identifier format General.
  4. Fixed width after position 6; identifier format Text.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A2 contains “5x12X9”. What formula splits at both letter cases, converts the pieces and returns their total?
  1. =SUM(VALUE(TEXTSPLIT(A2,"x",,,1)))
  2. =SUM(TEXTSPLIT(A2,"x",,,1))
  3. =SUM(VALUE(TEXTSPLIT(A2,"x")))
  4. =SUM(VALUE(TEXTSPLIT(A2,"x",,TRUE,0)))
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

An import supplies the code “00507” and the mass text “3.480,25 kg”. Codes must remain text, and masses must be numeric regardless of computer settings. What treatment satisfies both requirements?
  1. Convert the code; remove “ kg” and use NUMBERVALUE with decimal “,” and group “.”.
  2. Keep the code; remove “ kg” and use NUMBERVALUE with decimal “.” and group “,”.
  3. Keep the code; remove “ kg” and use NUMBERVALUE with decimal “,” and group “.”.
  4. Keep the code; replace “,” with “.” and use VALUE without removing the grouping period.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Excel shows a gray Flash Fill preview matching the intended pattern. How is that preview accepted?
  1. Press Escape.
  2. Press Delete.
  3. Press F2.
  4. Press Enter.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A formula-based cleanup is complete. The source columns will be deleted, but the results must remain. What operation should happen first?
  1. Copy the results and Paste Special > Formulas.
  2. Copy the results and Paste Special > Values.
  3. Clear the source formats and keep the formulas.
  4. Delete the sources, then copy the results.
Show answerHide answer

Save this lesson to see this answer.

Set 4: Choose and check a complete text workflow10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

B2 stores the number 876.5 and displays it as “876.50”. What does =LEN(B2) return?
  1. 5
  2. 6
  3. 4
  4. 7
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A2 contains “Cost? approved”. What formula returns the location of the actual question mark using SEARCH?
  1. =SEARCH("?",A2)
  2. =SEARCH("*?",A2)
  3. =SEARCH("~?",A2)
  4. =SEARCH("?~",A2)
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A2 holds a code such as “AB/206/0059”. It must yield the numeric middle field for any prefix or middle-field length. B2 will hold the first slash position, C2 the second. What complete sequence works?
  1. B2: =FIND("/",A2); C2: =FIND("/",A2,B2); result: =VALUE(MID(A2,B2+1,C2-B2-1)).
  2. B2: =FIND("/",A2); C2: =FIND("/",A2,B2+1); result: =VALUE(MID(A2,B2,C2-B2-1)).
  3. B2: =FIND("/",A2); C2: =FIND("/",A2,B2+1); result: =VALUE(MID(A2,B2+1,C2-B2)).
  4. B2: =FIND("/",A2); C2: =FIND("/",A2,B2+1); result: =VALUE(MID(A2,B2+1,C2-B2-1)).
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A2 contains the text “ ab/ab/ab ”. The required result is “AB/ZZ/AB”. What formula handles the spaces, capitalization and selected replacement?
  1. =SUBSTITUTE(UPPER(TRIM(A2)),"AB","ZZ")
  2. =SUBSTITUTE(UPPER(TRIM(A2)),"AB","ZZ",2)
  3. =UPPER(TRIM(SUBSTITUTE(A2,"AB","ZZ",2)))
  4. =SUBSTITUTE(UPPER(TRIM(A2)),"AB","ZZ",3)
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A2 contains “Q/17/864”. What does =FIND("/",A2,FIND("/",A2)+1) return?
  1. 5
  2. 2
  3. 3
  4. 4
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A2:C2 contain “ Dock ”, a single ordinary space and “Bay ”. B3:D3 will be helper cells. What sequence produces “Dock, Bay” while leaving A2:C2 unchanged?
  1. Enter =TRIM(A2) in B3, fill right through D3, then use =TEXTJOIN(", ",FALSE,B3:D3).
  2. Enter =CLEAN(A2) in B3, fill right through D3, then use =TEXTJOIN(", ",TRUE,B3:D3).
  3. Enter =TRIM(A2) in B3, fill right through D3, then use =TEXTJOIN(", ",TRUE,A2:C2).
  4. Enter =TRIM(A2) in B3, fill right through D3, then use =TEXTJOIN(", ",TRUE,B3:D3).
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A one-time record is "Cairo, Egypt",00361,14/06/2026. The place must remain one field, the code must keep its zeros, and the date must be read correctly. What wizard setup works?
  1. Comma delimiter, double-quote qualifier, General code, Date DMY.
  2. Comma delimiter, no qualifier, Text code, Date DMY.
  3. Comma delimiter, double-quote qualifier, Text code, Date DMY.
  4. Comma delimiter, double-quote qualifier, Text code, Date MDY.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A2 contains “9;15;;6”. The output must ignore the empty piece, update with A2 and give a numeric total. What formula meets all three needs?
  1. =SUM(TEXTSPLIT(A2,";",,TRUE))
  2. =SUM(VALUE(TEXTSPLIT(A2,";",,TRUE)))
  3. =VALUE(TEXTJOIN("",TRUE,TEXTSPLIT(A2,";",,TRUE)))
  4. =TEXTJOIN(";",TRUE,TEXTSPLIT(A2,";",,TRUE))
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A cell stores 0.875 as a time. With English settings, what does =TEXT(A2,"h:mm AM/PM") return?
  1. “21:00 PM”
  2. “9:00 AM”
  3. “8:75 PM”
  4. “9:00 PM”
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A checked output list must be inspected from shortest to longest while keeping names and departments together. How should it be sorted?
  1. Add a LEN helper and sort the entire record range by it.
  2. Sort only the output text column from A to Z.
  3. Add a LEN helper and sort only the helper cells.
  4. Sort the entire record range by the output text from A to Z.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

62 Key Terms, each with its definition

A

Ampersand operator
The ampersand operator joins values in spreadsheet formulas and is written as &, with literal separators enclosed in quotation marks.
=A2&" / "&B2 places a spaced slash between the two referenced values in the result.

C

Cell number format
A cell number format changes how a numeric value is displayed while keeping its stored value numeric for calculations and numeric sorting.
Formatting 0.25 as 25% leaves the fraction available for calculations in the original cell.
Character position
A character position identifies a character’s place in a text string, counted from 1 at the left in these text functions.
In “INV-2025”, the first hyphen occupies position 4, so the year begins at position 5.
CLEAN
The CLEAN function removes control characters with codes 0–31 from text, including line feeds, without inserting replacement characters.
Cleaning “West” followed by a line feed and “Wing” produces “WestWing” unless a space is inserted first.
CODE
The CODE function returns the character code of the first character in a text value, helping diagnose some hidden text differences.
Applying CODE to RIGHT(A2) inspects the final character, where an unwanted space may be hiding.
Column data format
A column data format tells Text to Columns how to store each output field, such as Text for codes or Date with a specified input order.
Choosing Text for the identifier column preserves “00236” when the split is finished.
CONCAT
The CONCAT function joins values without adding separators; Excel accepts ranges, while Google Sheets accepts exactly two values.
In Excel, =CONCAT(A2:C2) combines all three cells without spaces unless the cells already contain them.
Concatenation
Concatenation is joining values into one text string in a chosen order, including any spaces or punctuation supplied between the pieces.
Joining a surname, a comma and a given name creates a label such as “Mensah, Ama”.

D

Date serial number
A date serial number is a numeric count of days used to store a spreadsheet date, with a date format supplying its readable display.
March 14, 2025 has serial 45730 in Excel’s default date system and in Google Sheets.
Delimiter
A delimiter is a character or text sequence that marks a boundary between fields and can guide extraction, splitting or joining.
The at sign separates the user name from the domain in “mina@example.com”.
Destination
The destination is the cell where the first output field of Text to Columns is written, with later fields occupying cells to its right.
An empty destination several columns away can preserve the original record and protect neighboring data.
Digit placeholder
A digit placeholder reserves a numeric position in a format code; 0 forces a digit, while # shows one only when needed.
Five zero placeholders turn the number 42 into the text “00042” when used by TEXT.
Dynamic result
A dynamic result is a formula output that recalculates when its referenced source values change, keeping the transformation linked to its input.
A LEFT-and-FIND extraction updates after the original code changes to another code with the same layout.

E

Empty text
Empty text is a text value containing no characters, written as ""; it can be returned by a formula even when the cell is not physically empty.
TEXTJOIN with ignore_empty TRUE skips a formula result of "", but it keeps a space-only value.
EXACT
The EXACT function tests whether two text values have identical characters and capitalization, returning TRUE or FALSE.
EXACT distinguishes the code “Qa-81” from “QA-81”, even though an equals-sign comparison ignores that case difference.

F

FILTER
The FILTER function selects values that meet a condition, supplying an array that TEXTJOIN can assemble into a single text list.
A team condition can select matching names before TEXTJOIN places commas between them.
FIND
The FIND function returns the start position of a matching text fragment, requiring the same letter case and treating wildcards literally.
=FIND("@","lee@example.com") returns 4, which can become the boundary for extracting the user name.
Fixed value
A fixed value is stored directly in a cell without a formula linking it to source data, so source edits do not recalculate it.
Text to Columns and Flash Fill leave fixed results that need to be recreated after the source changes.
Fixed width
A fixed-width layout assigns a constant number of character positions to each field, allowing a split at marked boundaries.
An eight-character date followed by a five-character code can be split after position 8.
Flash Fill
Flash Fill is Excel’s pattern-based tool that creates fixed output values from examples typed beside existing data.
A typed example such as “A. Diallo” can guide the same initials-and-surname pattern down the column.
Flash Fill preview
A Flash Fill preview is the gray suggested output that Excel may display after recognizing a typed pattern and can accept with Enter.
If no preview appears, the Data > Flash Fill command can still apply the examples manually.
Format code
A format code is a pattern describing the digits, separators or date and time parts used to display a value or create formatted text.
The English code “yyyy-mm-dd” shows the year, month and day in a consistent order.
Formula compatibility
Formula compatibility is a workbook’s ability to calculate its functions in the spreadsheet program and version that will open it.
A workbook using TEXTSPLIT needs Excel for Microsoft 365 or Excel 2024 to calculate that function.

H

Helper column
A helper column holds intermediate calculations or transformed values beside source data so the steps can be checked separately.
A helper column containing the first hyphen’s position makes a middle-field extraction easier to inspect.

I

IFERROR
The IFERROR function returns a chosen fallback when its first argument produces an error, allowing a formula to handle a failed search.
=IFERROR(FIND("@",A2),0) uses 0 to mark an entry that does not contain the required separator.
ignore_empty
The ignore_empty argument controls whether empty pieces are skipped; its meaning must be read with the particular joining or splitting function.
TEXTJOIN uses TRUE to skip empty cells, while TEXTSPLIT uses TRUE to drop empty split pieces.
Instance number
An instance number selects a particular occurrence of a repeated match or delimiter, such as the second period in a date string.
Setting SUBSTITUTE’s fourth argument to 2 changes only the second matching separator in the entry.
ISNUMBER and ISTEXT
The ISNUMBER and ISTEXT functions test a stored value’s type and return TRUE or FALSE, independently of its chosen display alignment.
After conversion, ISNUMBER confirms that the extracted digits are available as a numeric value.

L

Leading zero
A leading zero is a zero before the first nonzero digit in a text code or formatted display, often needed to preserve an identifier’s length.
The identifier “00063” has three leading zeros that are lost if it is converted to the number 63.
LEFT and RIGHT
The LEFT and RIGHT functions return a chosen number of characters from the beginning or end of a value, with the result stored as text.
=RIGHT("CR-0068",4) returns “0068”, keeping the zeros that belong to the code.
LEN
The LEN function returns the number of characters in a value, counting spaces and punctuation as well as visible letters and digits.
=LEN("North ") returns 6 because the final ordinary space is included in the count.
Line feed
A line feed is the control character represented by CHAR(10) that starts a new line within a cell when the display supports it.
A text join can insert a line feed between two address lines displayed in one wrapped cell.
Literal text
Literal text is text written directly inside a formula in quotation marks, so the characters become part of the formula’s text result.
In ="Batch: "&A2, the word and space inside the quotes form the fixed beginning of the label.

M

match_mode
The match_mode argument controls TEXTSPLIT’s delimiter case matching: 0 requires matching case, while 1 ignores case.
A mode of 1 splits a dimension string at both lowercase “x” and uppercase “X”.
MID
The MID function returns text starting at a stated character position and continuing for a stated number of characters.
=MID("AB-724-Q",4,3) takes the three characters “724” beginning after the first hyphen.

N

Nested function
A nested function is a function used inside another function’s arguments, so its result supplies part of the surrounding calculation.
In =LEFT(A2,FIND("@",A2)-1), FIND supplies the position used to calculate LEFT’s character count.
Nonbreaking space
A nonbreaking space is a space character often copied from web pages that survives Excel’s TRIM and can prevent text values from matching.
Replacing CHAR(160) with an ordinary space allows a later TRIM to tidy the pasted label.
Number stored as text
A number stored as text contains numeric-looking characters but has text type, so functions such as SUM can skip it in a range.
A pasted “48” may look like a quantity but return FALSE when checked with ISNUMBER.
NUMBERVALUE
The NUMBERVALUE function converts numeric text in Excel with explicitly supplied decimal and grouping separators, independently of local settings.
A decimal comma and grouping period can be named to read the imported text “2.345,6” correctly.

P

pad_with
The pad_with argument supplies the filler for missing TEXTSPLIT fields when output rows have unequal lengths; its default is #N/A.
An empty-text filler makes an absent quantity field look blank without removing its position in the grid.
Paste Special > Values
Paste Special > Values writes copied formula results as fixed cell values, removing their dependence on the original formula references.
Paste the final cleaned results as values before deleting the source columns they used.
Pattern example
A pattern example is a manually entered desired result that shows Flash Fill which pieces to take and how to arrange them.
A row with a middle name helps show whether the desired output includes all given names or just the first.
PROPER
The PROPER function capitalizes letters at word starts and after nonletters, then lowercases the other letters in the text.
PROPER changes “NASA office” to “Nasa Office”, so the abbreviation needs a separate review.

R

REPLACE
The REPLACE function changes a specified number of characters beginning at a specified position, without searching for an old text match.
REPLACE can update a four-character year field when every code stores that field at the same position.
Row delimiter
A row delimiter marks where TEXTSPLIT starts a new output row, allowing a single text entry to produce a vertical list or grid.
Using a semicolon as the row delimiter puts the next record below the previous one.

S

SEARCH
The SEARCH function returns a match’s starting position while ignoring letter case and allowing wildcard patterns in its search text.
Searching for “ref” can find the word “Ref” even though its first letter is capitalized.
Smart Fill
Smart Fill is Google Sheets’ pattern-suggestion feature, which can fill results using formulas that can be inspected in the filled cells.
Clicking a Smart Fill result can show the formula used to produce a name extracted from the source.
Spill area
A spill area is the group of cells filled by one array formula’s results, controlled by the formula in the area’s first cell.
Clear occupied cells beside a TEXTSPLIT formula so that every output field has room to appear.
split_by_each
The split_by_each argument in Google Sheets SPLIT chooses whether delimiter characters act separately or as one complete text sequence.
FALSE keeps “Anne-Marie” intact when the intended delimiter is the whole sequence “ - ”.
Start position
A search’s start position tells FIND or SEARCH where to begin looking, while the returned position still counts from the whole string’s start.
Starting after the first slash lets a second FIND locate the next slash without finding the first again.
SUBSTITUTE
The SUBSTITUTE function replaces exact matching text with new text, changing all occurrences unless a specific instance number is supplied.
Replacing every hyphen with empty text turns the code “BX-24-07” into “BX2407”.

T

TEXT
The TEXT function converts a value into text using a quoted format code, allowing numbers and dates to appear readably inside labels.
TEXT can show a stored fraction as “28.5%” when that percentage becomes part of a sentence.
Text qualifier
A text qualifier encloses a field during a delimited import so a separator inside that field is not treated as a split point.
Double quotes keep the internal comma in “Lisbon, Portugal” inside the same imported place field.
Text string
A text string is a sequence of characters, including letters, digits, spaces and punctuation, stored or handled as text.
The code “WH-0046” is a text string whose hyphen and leading zeros are part of the identifier.
Text to Columns
Text to Columns is Excel’s wizard for splitting one selected column at delimiters or fixed positions and writing the pieces as fixed values.
A one-time contact export can be split into name and city columns using a comma delimiter.
TEXTBEFORE and TEXTAFTER
The TEXTBEFORE and TEXTAFTER functions return text on a selected side of a delimiter in Excel for Microsoft 365 and Excel 2024.
=TEXTAFTER(A2," ",-1) takes the text after the last space by counting delimiter instances from the end.
TEXTJOIN
The TEXTJOIN function combines values with a chosen delimiter and an explicit rule for keeping or skipping empty values.
An address joined with a comma and space can omit an unused address line by setting ignore_empty to TRUE.
TEXTSPLIT
The TEXTSPLIT function divides text at column or row delimiters and returns an array of text pieces that updates with the source.
A comma-and-semicolon input can become a grid with commas separating fields and semicolons separating rows.
TRIM
The TRIM function removes ordinary spaces from the ends of text and reduces repeated ordinary spaces between words to a single space.
Trimming “ Main Office ” gives “Main Office” without joining the two words together.

U

UPPER and LOWER
The UPPER and LOWER functions change letters to uppercase or lowercase while leaving digits, spaces and punctuation unchanged.
Using UPPER on “wh-52” gives “WH-52”, a consistent display for a warehouse code.

V

VALUE
The VALUE function converts text in a recognized number, date or time format into a numeric value using the program’s current settings.
Removing “ kg” before applying VALUE converts “9.5 kg” into the numeric mass 9.5.

W

Wildcard
A wildcard is a pattern character that stands for other characters; SEARCH accepts ? for one character and * for a sequence.
The search pattern “c?t” can match “cat”, while “~?” searches for an actual question mark.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started