BINJONE
11-03-2019, 03:08 AM
The following macro adds text to end of excel cell that you select. But its not very user friendly because you have every time to change the text that you want to add.
I wonder if we can add a line in the code that asks the users which text they want to add and in which cells in the end of every cell they choose
Sub AppendToExistingOnLeft()
Dim c As Range
Set mR = Application.InputBox("Select your Text", , , , , , , 8)
If mR Is Nothing Then MsgBox "Nothing Selected!", vbExclamation: Exit Sub
On Error GoTo 0
For Each c In Selection
If c.Value <> "" Then c.Value = "## " & c.Value
Next
End Sub
I wonder if we can add a line in the code that asks the users which text they want to add and in which cells in the end of every cell they choose
Sub AppendToExistingOnLeft()
Dim c As Range
Set mR = Application.InputBox("Select your Text", , , , , , , 8)
If mR Is Nothing Then MsgBox "Nothing Selected!", vbExclamation: Exit Sub
On Error GoTo 0
For Each c In Selection
If c.Value <> "" Then c.Value = "## " & c.Value
Next
End Sub