Then go back to the worksheet, and then enter this formula: =removefirstx(A4,2) into a blank cell, and then drag the fill handle down to get the results as you need, see screenshot: RemoveFirstx = Right(rng, Len(rng) - cnt)ģ. Public Function removeFirstx(rng As String, cnt As Long) Click Insert > Module, and paste the following code in the Module Window. Hold down the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.Ģ. Here is a User Defined Function which also can help you to remove first or last n characters from text strings, please do as this: Remove first x characters from the beginning of the text strings:ġ. Method 2: Remove first or last x characters from text strings with User Defined Function