I found the following [function](https://www.extendoffice.com/documents/excel/1783-excel-remove-text-before-character.html) that will remove any characters *before* a specified character.

However, I want to make it so that it removes all of the characters *after* the specified character.

Please can you help me achieve this.

```
Sub RemoveAllButLastWord()
'Updateby20140612
Dim Rng As Range
Dim WorkRng As Range
Dim xChar As String
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
xChar = Application.InputBox("String", xTitleId, "", Type:=2)
For Each Rng In WorkRng
    xValue = Rng.Value
    Rng.Value = VBA.Right(xValue, VBA.Len(xValue) - VBA.InStrRev(xValue, xChar))
Next
End Sub

```