How to add prefix or suffix into cell values in Google sheets?
When working with data in Google Sheets, you may sometimes need to add the same prefix or suffix text to a group of cell values, as displayed in the screenshot below. Manually typing each prefix or suffix for every cell would be time-consuming and not efficient, especially when dealing with a large dataset. Fortunately, Google Sheets provides several effective ways to accomplish this task quickly and accurately, saving you time and reducing the risk of manual error. In this guide, you’ll discover step-by-step solutions for adding prefixes or suffixes to multiple cells, understand when to use each method, and learn tips to avoid common mistakes.
Add prefix or suffix text into multiple cells with formulas
Add prefix or suffix text into multiple cells with formulas
A practical way to add a prefix or suffix to each cell in a column is by using formulas. This is especially useful when you don’t want to overwrite your original data and prefer to display the new results in another column. The following methods are flexible, quick to implement, and can be easily expanded or adjusted for different datasets.
Typical usage scenarios include:
- Adding product codes, department labels, or identifiers to existing data
- Standardizing formats for import/export purposes
- Managing lists for batch processing or reporting
Add prefix text into multiple cells:
To add the same prefix to a range of cells, enter the following formula into a blank cell where you want the results (for example, cell B2):
=arrayformula("Extend-" & A2:A6)
Press the Enter key to confirm. The specified range will display each original value with the prefix Extend- added as shown below:
Note: In this formula, Extend- represents the prefix text you want to add, and A2:A6 is the cell range you want to modify. You can adjust both the prefix and the target range as required. Be sure there is enough empty space below your formula cell—the output will "spill" into adjacent cells. If you see a #REF! error, make sure the output cells are not already occupied.
Add suffix text into multiple cells:
To append the same suffix to each value in a column, input this formula into a blank cell (such as B2):
=arrayformula(A2:A6 & "-Addin")
Press Enter. The suffix -Addin will be added after each value in your selected range.
Note: In the formula above, -Addin is the suffix to be added, A2:A6 is your input range. Adjust as needed for your actual data range and required suffix. If your column extends much further, simply update the cell references accordingly.
Add both prefix and suffix text into multiple cells:
To add both a prefix and a suffix to your target cells, use this formula in a blank cell in the results column (such as B2):
=arrayformula("Extend-" & A2:A6 & "-Addin")
Hit Enter, and each cell in the selected range will show the prefix and suffix added to the original value.
Note: Here, Extend- and -Addin are your desired prefix and suffix, respectively. A2:A6 is the reference range—modify both parts to fit your specific case. If any cell in the range is empty, the result for that row will simply show the prefix and suffix with nothing in between.
Formulas are best when your data updates frequently or if you intend to keep your original data intact, as the results are dynamic and update automatically when the source data changes. However, if you need to overwrite cell values directly, a different approach—such as using Google Apps Script—may be more appropriate. Also, note that formula results cannot be edited directly; you would need to copy and paste-as-values if you want to convert the results to static text.
If you encounter unexpected errors, such as #VALUE! or incorrect output, ensure that your source data does not include non-text elements (like images or array formulas with different row counts), and check if there are merged cells in the target range.
If you find array formulas too complex, you can also use one of the following simpler alternatives:
=A2&"-Addin")
=CONCATENATE(A2,"-Addin")
And drag the autofill handle over the cells you want to use the formula.
Kutools for Excel: Add Text in Seconds – Supercharge Your Spreadsheets!
Effortlessly insert, prepend, or append text across cells with just a few clicks – no formulas needed!
Download Kutools now and streamline your Excel workflow like a pro! ? [Get It Here]
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!