Yes, Excel can insert text into a cell automatically using functions. Instead of typing the same prefix, suffix, or label into hundreds of cells by hand, you can use formulas such as CONCAT, CONCATENATE, the ampersand operator (&), or TEXTJOIN to add text before, after, or between existing values. Everything below works in current versions of Excel for Windows and Mac, and in Excel for the web.
What You'll Need
- A spreadsheet with at least one column of existing data you want to add text to
- Excel (desktop or Excel for the web); any version from the last several years supports these functions
- A basic familiarity with entering formulas in a cell (typing = followed by the function)
Step-by-Step
- Insert text in front of an existing value. Click an empty cell next to your data, type
="Ref-"&A2and press Enter. This puts "Ref-" before whatever is in A2. Replace "Ref-" with any text you like, keeping the quotation marks. - Insert text after an existing value. Use the same idea in reverse:
=A2&" units"adds " units" after the value in A2. Note the space inside the quotes - Excel adds exactly what you type. - Insert text in the middle of a value. Combine LEFT and RIGHT:
=LEFT(A2,3)&"-inserted-"&MID(A2,4,100)takes the first 3 characters, adds your text, then adds the rest. Adjust the numbers to match where you want the insertion point. - Use CONCAT for cleaner formulas. CONCAT replaces the older CONCATENATE function and accepts a list:
=CONCAT("ID-",A2,"-v2")joins everything in order. It does the same job as ampersands but reads more clearly when joining many pieces. - Join many cells with a separator using TEXTJOIN. Type
=TEXTJOIN(", ",TRUE,A2:C2)to combine A2, B2 and C2 with a comma and space between them. The TRUE tells Excel to skip empty cells - use FALSE if you want blanks included. - Insert text based on a condition. Use IF to add text only when a test passes:
=IF(B2>100,A2&" (high)",A2)appends " (high)" only when B2 is greater than 100; otherwise it returns the original value unchanged. - Copy the formula down. Click the cell with your formula, then drag the small square (the fill handle) at its bottom-right corner down the column. Relative references like A2 adjust automatically for each row.
- Replace the original column with the results. Select the formula results, copy them (Ctrl+C), then right-click the destination cells and choose Paste Special > Values. This converts the formulas into plain text so you can delete the helper column. Save a copy of the workbook first if you are unsure.
Menu labels and the exact wording of paste options can differ slightly between Excel versions, platforms and languages, but the functions themselves behave the same everywhere.
Common Mistakes
- Forgetting the quotation marks. =A2&Ref- causes a #NAME? error because Excel treats Ref- as an undefined name. Literal text must always sit inside double quotes: =A2&"Ref-".
- Missing spaces. If you write =A2&"units" you get "15units". Put the space inside the quotes: =A2&" units".
- Starting a cell with text before the equals sign. Typing Total: =SUM(A1:A5) does not work - put the equals sign first, then the text: ="Total: "&SUM(A1:A5).
- Overwriting original data. Pasting values back over the source column before you have checked the results. Always verify a few rows first, and keep a backup copy of the file.
- Using CONCATENATE with ranges. CONCATENATE does not accept a range the way CONCAT does; with CONCATENATE you must list each cell individually.
Tips
- Press Ctrl+E (Flash Fill) after typing one or two examples in a new column - Excel can often detect the pattern and fill the rest with no formula at all. Check the results carefully, as Flash Fill guesses from patterns.
- Use CHAR(10) inside a concatenation to insert a line break within a cell: =A2&CHAR(10)&B2, then enable Wrap Text on the Home tab to see it.
- Format numbers while joining with TEXT: ="Total: "&TEXT(B2,"0.00") controls decimals, since plain concatenation can drop number formatting.
- Named ranges or table references (like Table1[Code]) make formulas easier to read when a column is used repeatedly.
Troubleshooting
- #NAME? error: Excel does not recognise a word in your formula - usually unquoted literal text or a misspelled function. Check spelling and quotation marks.
- The formula shows as text instead of calculating: the cell is probably formatted as Text. Select the cell, set the format to General on the Home tab, then press F2 and Enter to recalculate.
- Results shift or break after copying: a relative reference moved when it should not have. Add dollar signs (for example $A$2) to lock a reference before copying.
- TEXTJOIN or CONCAT not recognised: you are likely on a very old Excel version. Use the ampersand operator instead - it works in every version.
- Results look wrong after Paste Special: you may have pasted formulas instead of values, or pasted over the source data the formulas refer to. Undo (Ctrl+Z) and repeat step 8 carefully.
Frequently Asked Questions
What is the difference between CONCAT and the & operator?
They produce identical results. The ampersand works in every Excel version; CONCAT is the modern function and can accept ranges, which the ampersand cannot.
Can I insert the same text into many cells at once without a formula?
Yes. Copy the text, select all target cells, paste, and every selected cell receives it. Flash Fill (Ctrl+E) also works when the text follows a pattern.
How do I add text before a number without losing the number format?
Wrap the number in TEXT with a format code, for example ="$"&TEXT(A2,"0.00"). Plain concatenation often drops currency or date formatting.
Is there a function that inserts text at a specific position?
Not a single one, but REPLACE does it: =REPLACE(A2,4,0,"-X-") inserts "-X-" after the third character. The zero means no characters are removed.
Why does my concatenated date appear as a number?
Excel stores dates as serial numbers and concatenation shows the raw number. Use TEXT with a date format code, such as ="Due: "&TEXT(B2,"dd/mm/yyyy").