When preparing product catalogues, inventory databases, or accounting summaries in Microsoft Excel, raw imported data frequently lacks necessary identifying tags. You might need to add a country dialling code prefix like +44- to customer telephone numbers, prepend SKU- to product codes, or append a measurement suffix like kg or hrs across thousands of cells.
Manually retyping each cell is impossible on large datasets. Excel offers multiple fast techniques to attach prefixes and suffixes using formulas, custom cell formatting, and Flash Fill.
Method 1: Using the Ampersand (&) Concatenation Formula
The most versatile way to append text using a simple formula:
- Click into an empty adjacent cell (such as
B2next to your original data inA2). - To add a prefix (e.g. adding ID-):
="ID-" & A2 - To add a suffix (e.g. adding units):
=A2 & " units" - To add both a prefix and a suffix simultaneously:
="REF: " & A2 & " (Confirmed)" - Press Enter, then double-click the green fill handle in the corner of cell
B2to copy the formula down your entire table. - Optional: Copy column B, right-click, and choose Paste Values to replace the formulas with permanent static text.
Method 2: Using Custom Number Formatting (Preserves Math Functions)
If your cells contain numbers that you still need to calculate, average, or sum using formulas, appending text strings breaks standard math. Custom cell formatting lets you display a prefix or suffix visually while leaving the cell’s underlying value purely numeric:
- Select your range of numbers.
- Press Ctrl + 1 on Windows (or Command + 1 on Mac) to open the Format Cells dialogue box.
- On the Number tab, select Custom at the bottom of the Category list.
- In the Type: input box:
- To add a suffix (e.g. ” kg”): type
0" kg"or#,##0.00" kg". - To add a prefix (e.g. “Dept-“): type
"Dept-"0.
- To add a suffix (e.g. ” kg”): type
- Click OK. Excel visually displays the label beside your figures, but formulas like
=SUM()continue to calculate the numbers without errors.
Method 3: Using Flash Fill (No Formulas)
If you prefer an instant formula-free solution:
- In cell
B2, manually type the first entry with your desired prefix or suffix. - Press Enter to move to cell
B3. - Press Ctrl + E on Windows (or navigate to Data > Flash Fill).
- Excel recognises the pattern instantly and fills the entire column automatically.
Appending prefixes and suffixes standardises imported data, turning messy raw entries into clean, publication-ready reports.