How to add text to the end all cells

,

In the previous post, we talked that how to add the same text into the beginning of the text in one cell or all selected cells. And this post will guide you that how to add the specified text or characters to the end of all cells in excel. How to create an excel formula to add same text string or characters to the end of text string in one Cell. How to create an excel macro to add specific text to the end of the text in all of cells.

Add text to the end of all cells with Formula

To add the specified text string or characters to the end of all selected cells in excel, you can use the concatenate operator or the CONCATENATE function to create an excel formula.

For example, if you want to add text “excel” into the end of the text in Cell B1, you can use the following excel formula:

= B1&" "& "excel"

OR

=CONCATENATE(“B1”,””,”excel”)

You can enter the above formulas in Cell C1, and then drag the fill handle down to other cells in column C and you will see that the specified text “excel” has been added into the end of the text string in B1.

add text to end of text1

add text to end of text1

Add text to the beginning of all cells with Excel VBA

You can create a new excel macro to add text string “excel” to the end of text in Cell B1 in Excel VBA, just refer to the below steps:

1# click on “Visual Basic” command under DEVELOPER Tab.

Get the position of the nth using excel vba1

2# then the “Visual Basic Editor” window will appear.

3# click “Insert” ->”Module” to create a new module

convert column number to letter3

4# paste the below VBA code into the code window. Then clicking “Save” button.

Sub addTextAtEndCell()
    Dim e as range
    For each e in Selection
        If e.value <> "" Then e.value = e.value & "excel"
    Next
End Sub

add text to end of text3

5# back to the current worksheet, then run the above excel macro, you will see that the specific text “excel” has been added into the end of the text in all selected Cells.

add text to end of text4


Related Formulas

Related Functions

  • Excel Concat function
    The excel CONCAT function combines 2 or more strings or ranges together.This is a new function in Excel 2016 and it replaces the CONCATENATE function.The syntax of the CONCAT function is as below:=CONCAT (text1,[text2],…)…

Leave a Reply