✦ Free AI Tool

Text Formula Generator

Generate text manipulation formulas from plain English. Merge cells, extract characters, clean data, split text. Free, no signup, works for Excel and Google Sheets.

Generate Formula Free → Back to Home
Text Functions in Excel & Google Sheets

What Are Text Functions?

Text functions in Excel and Google Sheets let you manipulate, combine, clean, and extract text from cells. Whether you need to merge first and last names, extract a domain from an email address, remove extra spaces, or split text into multiple columns, text formulas are essential for any data cleanup or formatting task.

The most common text functions are CONCATENATE / TEXTJOIN for merging, LEFT / RIGHT / MID for extracting, TRIM for cleaning, and SUBSTITUTE / REPLACE for finding and replacing text.

Key Text Functions
=LEFT(text, num_chars) -- Extract characters from the left =RIGHT(text, num_chars) -- Extract characters from the right =MID(text, start_num, num_chars) -- Extract from the middle =TRIM(text) -- Remove extra spaces =SUBSTITUTE(text, old, new) -- Replace text =TEXTJOIN(delimiter, ignore_empty, range) -- Merge with delimiter =CONCATENATE(text1, text2, ...) -- Join text strings =CLEAN(text) -- Remove non-printable characters

How to Use This Generator

  1. Go to the ExcelForm tool on the homepage
  2. Click the Generate tab
  3. Describe your text manipulation in plain English — be specific about what text to extract, merge, or replace
  4. Select your environment (Excel, Google Sheets, or Both)
  5. Click Generate Formula and copy the result into your spreadsheet

Example: Text Formula Generator in Action

✎ What you type

"Combine first name in column A and last name in column B with a space between them."

✓ What ExcelForm generates

=A2&" "&B2 (or =TEXTJOIN(" ",TRUE,A2,B2))

✎ What you type

"Extract everything before the @ symbol in the email in column A."

✓ What ExcelForm generates

=LEFT(A2,FIND("@",A2)-1)

Text Function Reference

CONCATENATE / & Operator
Join two or more text strings. The ampersand (&) is the modern shorthand: =A2&" "&B2
TEXTJOIN
Merge a range with a delimiter, optionally skipping blanks. =TEXTJOIN(", ",TRUE,A2:A10)
LEFT / RIGHT / MID
Extract characters from the left, right, or middle of a string. =LEFT(A2,3) gets first 3 chars.
TRIM
Remove all extra spaces, leaving only single spaces between words. =TRIM(A2)
SUBSTITUTE
Replace specific text with new text. =SUBSTITUTE(A2,"Old","New")
UPPER / LOWER / PROPER
Change text case. =PROPER(A2) capitalizes each word.
LEN
Count characters in a string. =LEN(A2)
FIND / SEARCH
Find the position of text within a string. =FIND("@",A2)

Common Mistakes to Avoid

CONCATENATE vs TEXTJOIN — Which Should You Use?

CONCATENATE and the & operator simply join strings end-to-end with no separator handling. TEXTJOIN is the modern replacement: it lets you specify a delimiter, optionally ignore empty cells, and works with entire ranges in one call.

Use CONCATENATE or & only for simple two-string joins in older Excel versions (2016 and earlier). Use TEXTJOIN for merging lists, combining cells with commas or spaces, or any situation where you might have blank cells.

Google Sheets supports both, but TEXTJOIN is available and recommended.

Extracting, Cleaning, and Transforming Text

Data imported from other systems is often messy — extra spaces, inconsistent capitalization, merged fields, or unwanted characters. Text formulas are your cleanup toolkit.

Extracting: Use LEFT, RIGHT, and MID together with FIND and LEN to pull substrings dynamically. For example, to extract a file extension: =RIGHT(A2,LEN(A2)-FIND(".",A2)).

Cleaning: TRIM removes extra spaces. CLEAN removes non-printable characters. Combine them: =TRIM(CLEAN(A2)) for maximum data hygiene.

Transforming: UPPER, LOWER, and PROPER standardize case. SUBSTITUTE and REPLACE swap or remove specific text.

Splitting: In Excel 365, TEXTSPLIT(A2, ",") splits by delimiter. In Google Sheets, use SPLIT(A2, ","). In older Excel, use a combination of LEFT, FIND, MID, and LEN to manually parse delimited values.

📖 Related Guide
Google Sheets vs Excel Formulas →

Generate Your Text Formula Free

Free AI formula generator — no signup, no credit card. 10 queries per day.
The only tool offering all 6 formula tools free without signup.

Generate Formula Free
Related Tools
Date Formula Generator IF Formula Generator Fix Broken Formula
FAQ

Frequently Asked Questions

How do I combine text from multiple cells in Excel?
Use the ampersand operator (&) to join text: =A2&" "&B2. For merging many cells with a delimiter, use TEXTJOIN: =TEXTJOIN(", ",TRUE,A2:A10). ExcelForm's text formula generator creates the right formula based on your description.
What is the difference between CONCATENATE and TEXTJOIN?
CONCATENATE joins text strings together without delimiters and ignores empty cells. TEXTJOIN lets you specify a delimiter (like a comma or space) and can optionally skip empty cells. TEXTJOIN is the modern replacement and is available in Excel 2019+, Excel 365, and Google Sheets.
How do I extract the first name from a full name cell?
Use the LEFT and FIND functions together: =LEFT(A2,FIND(" ",A2)-1). This finds the position of the space and extracts everything before it. For last names, use RIGHT, LEN, and FIND: =RIGHT(A2,LEN(A2)-FIND(" ",A2)).
How do I remove extra spaces from text in Excel?
Use the TRIM function: =TRIM(A2). TRIM removes all spaces from text except single spaces between words. For removing ALL spaces, use SUBSTITUTE: =SUBSTITUTE(A2," ","").
How do I split text into multiple cells?
In Excel 365, use TEXTSPLIT: =TEXTSPLIT(A2,","). In Google Sheets, use SPLIT: =SPLIT(A2,","). For older Excel versions, use Text to Columns (Data tab) or a combination of LEFT, RIGHT, MID, FIND, and LEN.
Can I change text case with a formula?
Yes. UPPER converts to all capitals: =UPPER(A2). LOWER converts to lowercase: =LOWER(A2). PROPER capitalizes the first letter of each word: =PROPER(A2). These work in both Excel and Google Sheets.
How do I replace specific text in a cell?
Use SUBSTITUTE to replace specific text: =SUBSTITUTE(A2,"old","new"). To replace only the first occurrence, add the optional instance_num: =SUBSTITUTE(A2,"old","new",1). For pattern matching, use REGEXREPLACE in Google Sheets.
Is the text formula generator free?
Yes, completely free. 10 AI formula queries per day, no signup, no credit card required. Generate text formulas for Excel, Google Sheets, and Airtable.