This post will guide you how to remove suffix form a range of cells in Excel. How do I remove prefix from text string in cells with a formula in Excel.
Assuming that you have a list of data in range B1:B5, you want to remove the prefix “www.” or suffix “.com” from the text string in cells. Let’s see the following introduction.
Remove Prefix of Cells
If you want to remove prefix characters from the text string in range B1:B5, you can use a formula based on the RIGHT function and the LEN function. Like this:
=RIGHT(B1,LEN(B1)-4)
Type this formula into a blank cell and press Enter key on your keyboard. And then drag the AutoFill Handle down to cells to apply this formula.
Let’s see how this formula works:
Number 4 is the length of your prefix characters. And the Len function returns the length of the cell B1. The RIGHT function will remove the leftmost four characters (prefix) and return the rest characters of the text string.

Remove Suffix of Cells
If you want to remove the suffix characters (.com) from the given range of cells in your worksheet, you can use a formula based on the LEFT function and the Len function. Like this:
=LEFT(B1,LEN(B1)-4)
Type this formula into a blank cell and press Enter key on your keyboard. And then drag the AutoFill Handle down to cells to apply this formula.

Related Posts
Extract substring In Excel
This post will guide you how to use Excel's MID function is a quick and easy way to extract pieces from your text. Use the Excel formula to extract a substring with MID. Note: If you want to extract just ...
How to Convert Text to Time in Excel
This post will guide you how to convert time string to time in Excel. Assuming that you have a list of text string in your worksheet, and you wish to convert these time string to standard time format, how to ...
How to Remove Last or Trailing Commas in Excel
This post will guide you how to remove trailing commas from cell in Excel. How do I remove comma character at the end of a cell with a formula in Excel 2013/2016. Remove Trailing Commas if you want to remove ...
How to Convert mmddyy to Date in Excel
This post will guide you how to convert non-standard date formats or text to a standard date in Excel. If you have a date with mmddyy format, and you want to change it as the normal date format as mm/dd/yyyy ...
How to Sort Data by Last Character in Excel
This post will guide you how to sort cells by last character in Excel. How do I sort data by the last character with a formula in Excel. How to sort cells based on the last character with User Defined ...
Extract Email Address from Text
This post will guide you how to extract email address from a text string in Excel. How do I use a formula to extract email address in Excel. How to extract email address from text string with VBA Macro in ...