How to add text to the beginning or end of all cells in Excel?
Sometimes you may need to add same specific text to the beginning or end of all cells in a selection. If you added the text to each cell manually one by one, it must be time-consuming. Are there easier ways? Yes, there are many easy tricks to add same text to the beginning or end of all cells in a selection.
There are two formulas to add specified text to the beginning or end of all selected cells in Microsoft Excel.
Method 1: & formula
Enter the ="Class A:"&A2 in Cell C2, and then drag the fill handle down to the cells you want to aply this formula. And the specific text has been added before all of the cells, see screenshot:
Method 2: Concatenate formula
Enter the =Concatenate ("Class A:", A2) in Cell C2, and then drag and copy this formula to the cells you want to use, see screenshot:
1. If you want to add other specified text in each cell, just replace the Class A: with your text in both formulas.
2. The formulas of =A2 & ": Class A" and =Concatenate (A2, ": Class A") will add : Class A at the end of the cells.
3. Both formulas will not modify the contents in selection directly.
add same text to a specific location of each cell in Excel
|How could you add text or characters to the beginning of multiple cells, or add text or characters to the end of cells or insert text or characters between existing text? With Add Text utility of Kutools for Excel, you can quickly apply the following operations: . Click for full-featured free trial in 60 days!|
|Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in full future 60 days.|
If you want to add specified text in each cells of a selection directly, the following VBA Macro will ease your work.
1. Select the range in which you will add specified text;
2. Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.
3. Click Insert > Module, and paste the following VBA code in the Module Window.
VBA: Adding specified text at the beginning of each cell:
Sub AppendToExistingOnLeft() Dim c As Range For Each c In Selection If c.Value <> "" Then c.Value = "CN- " & c.Value Next End Sub
4. Press F5 key to run this macro. And all of the cells will be added the value CN- before the cell contents.
Notes: 1. To add some specific text at the end of each cell, please apply the following VBA code.
VBA: Adding specified text at the end of each cell:
Sub AppendToExistingOnRight() Dim c as range For each c in Selection If c.value <> "" Then c.value = c.value & "-CN" Next End Sub
And you will get the following result:
2. you can change the variable "CN-" or "-CN" of the above codes.
Kutools for Excel's Add Text tool will help you quickly add specified text to the beginning or end of each cell in a selection.
|Kutools for Excel, with more than 300 handy functions, makes your jobs more easier.|
After installing Kutools for Excel, please do as below:（Free Download Kutools for Excel Now!)
1. Select the range in which you will add specified text.
2. Click the Kutools > Text > Add Text…. See screenshot:
3. In Add Text dialog box, enter the text you need to add in the Text box.
(1.) If you check Before first character from the Position section, and the specific text will be added in front of all the cell values, see screenshot:
(2.) If you check After last character from the Position section, and the specific text will be added at the end of the cell values, see screenshot:
1. Kutools for Excel's Add Text tool allows you to preview the changes in selection in Preview section.
2. If you check the Skip non-text cells option, this tool won't add the specified text in cells with non-text content.
Applying Kutools for Excel's Add Text function, you can not only add the specified text to the beginning or end of the cells, but also you can add the specified text to the specified position of the cells.
1. Select a range you want to add text to, and then click Kutools > Text > Add Text.
2. The Add Text dialog will be displayed, and enter the specified text and specify the certain position which you want to insert the text in the boxes. See screenshot:
Here I type 3 into the Specify textbox means that add text after the third character of the string.
3. Click Ok or Apply. The specified text has been added to the specified position of the cells. See screenshot:
(1) In Specify textbox, you can type numbers with comma separate to add text in multiple position at the same time.
(2）If you want to add text before every uppercase letter, the 1st letter is uppercase option in Add Text utility can help you.
Also, you can add text before every lowercase letter, or every number letter.
Tabbed browsing & editing multiple Excel workbooks/Word documents as Firefox, Chrome, Internet Explore 10!
You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Excel workbooks or Word documents in one Excel window or Word window, and easily switch between them by clicking their tabs. Click for free 45-day trial of Office Tab!
- Add strings of text to multiple cells
- Add/ insert leading zeros to numbers or text
- Add/ insert prefix or suffix to selected cells, rows, and columns
- Add percentage symbol for multiple numbers in cells
Recommended Productivity Tools
Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.
Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!
300 New Features for Excel, Make Excel Much Easy and Powerful:
- Merge Cell/Rows/Columns without Losing Data.
- Combine and Consolidate Multiple Sheets and Workbooks.
- Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
- Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
- More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.
To post as a guest, your comment is unpublished.· 5 months agoThanks a lot!! I was initially using Access but this is so much easier.
To post as a guest, your comment is unpublished.· 11 months agoHello, i want to add text in a formula;
current cell value: ='DAM91-SVC'!$C$47
i want to add text: [MHSV Sales Report 2017 (JAN-DEC).xlsx]
therefore the cell value should read like this in the end: ='[MHSV Sales Report 2017 (JAN-DEC).xlsx]DAM91-SVC'!$C$47
please tell me how will this be done.
total 1800 cell count need alteration.
To post as a guest, your comment is unpublished.· 5 days agoHello, sorry to read your question so late. Here is a solution but you need to free download Kutools for Excel.
Using the Convert Formula to Text utility to convert the formula cell to text, then apply Add Text utility to add the text string in the Specify position(1), then click Ok. After all cells have been added text, conver them to formula by click Kutools > Content > Convert Text to Formula.
To post as a guest, your comment is unpublished.· 1 years agoHi I want to add $ symbol to a field value, to even the length of 9 chars.
Below is my requirement, please help
FL1000 -- > $$$FL1000
FL10003 --> $$FL10003
To post as a guest, your comment is unpublished.· 1 years agoSub AppendToExistingOnLeft()
Dim c As Range
For Each c In Selection
If c.Value <> "" Then c.Value = "' " & c.Value
Great formula, with the addition of the 5th line, it automatically switches to the next cell, providing users with the ability to use a "Ctrl + " ", to populate a large amount of data by just holding down "Ctrl+ "(any common letter of choice) ".
- ← Previous
- Next →