How to Remove Prefix in Excel (6 Methods)

The following sample dataset shows some student IDs that start with ID and the Name of the corresponding IDs in Column C and Column B respectively.

how to remove prefix in excel


Method 1 – Apply the RIGHT and LEN Functions to Remove Prefix in Excel

Step 1:

  • Select cell D5 to replace special characters from cell C5.

Apply the RIGHT and LEN Functions to Remove Prefix in Excel

  • Add the RIGHT and the LEN functions below in the Formula Bar.
=RIGHT(C5,LEN(C5)-2)
  • Here, C5 refers to the cell from which you want to remove the prefix of the student’s ID, the RIGHT function indicates that the characters of the text will be taken from the last character, and LEN(C5)-2 indicates that the resultant text will be without the first two characters of the referred text (C5).

Apply the RIGHT and LEN Functions to Remove Prefix in Excel

  • Press Enter to get the output of the functions. The output of the functions is of the functions is 67616.

Step 2:

  • On pressing Enter, place your cursor on the bottom right of cell D5 to get the AutoFill sign.

Apply the RIGHT and LEN Functions to Remove Prefix in Excel

  • Drag the AutoFill sign downward to remove the prefix from Column C.

Read More: How to Remove Prefix 91 in Excel


Method 2 – Insert the REPLACE Function to Remove Prefix in Excel

Step 1:

  • Select an empty cell and add the REPLACE function. From our dataset we’ll select cell D5.

Insert the REPLACE Function to Remove Prefix in Excel

  • In cell D5 insert the following formula.
=REPLACE(C5,1,2,"")
  • C5 refers to the cell from which you want to remove the prefix of the students’ ID, 1 indicates that you want to remove the prefix from the first two characters of your text, 2 indicates that you want to remove the first two characters, and (” ”) indicates that you are removing that character.

Insert the REPLACE Function to Remove Prefix in Excel

  • Press Enter to get the return of the REPLACE function and the return is 67616.

Step 2:

  • Place your cursor on the bottom right side of cell D5 and an AutoFill sign pops up. Drag the AutoFill sign downward.

  • The prefix ID will be removed from the identification number.

Insert the REPLACE Function to Remove Prefix in Excel


Method 3 – Use of the MID and LEN Functions to Remove Prefix in Excel

Step 1:

  • To apply the MID and LEN functions, select a cell.

Use of the MID and LEN Functions to Remove Prefix in Excel

  • Insert the following formula in the Formula Bar,
=MID(C5, 3, LEN(C5)-1)

Use of the MID and LEN Functions to Remove Prefix in Excel

  • Press Enter to get 67616 as the return of the functions.

Step 2:

  • Place your cursor on the bottom right side of cell D5 for the  AutoFill sign to pop up. Drag the AutoFill sign downward.

Use of the MID and LEN Functions to Remove Prefix in Excel

  • Release the AutoFill  to get the desired output as shown in the image below.

Use of the MID and LEN Functions to Remove Prefix in Excel


Method 4 – Perform the Flash Fill Command to Remove Prefix in Excel

Steps:

  • Select cell D5 and insert Michael’s identification number 67616 without the prefix.

Perform Flash Fill Command to Remove Prefix in Excel

  • From Home Tab, go to,

Home → Editing → Fill → Flash Fill

Perform Flash Fill Command to Remove Prefix in Excel

  • Result shows all identification numbers without the ID.


Method 5 – Apply the SUBSTITUTE Function to Remove Prefix in Excel

Step 1:

  • Select cell D5 to apply the SUBSTITUTE.

Apply the SUBSTITUTE Function to Remove Prefix in Excel

  • Insert the SUBSTITUTE Function in the Formula Bar.
=SUBSTITUTE(C5, "ID", "")

Apply the SUBSTITUTE Function to Remove Prefix in Excel

  • Press Enter to get the output of the function, the output is 67616.

Apply the SUBSTITUTE Function to Remove Prefix in Excel

Step 2:

  • Place your cursor on the bottom right side of cell D5 and the AutoFill sign pops up.

Apply the SUBSTITUTE Function to Remove Prefix in Excel

  • Drag the AutoFill  downwards and release to get the output of the SUBSTITUTE Function.


Method 6 – Use of the Find & Replace Command to Remove Prefix in Excel

Steps:

  • From the Home Tab, go to,

Home → Editing → Find & Select → Replace

Use of the Find & Replace Command to Remove Prefix in Excel

  • A Find and Replace window pops up.

Use of the Find & Replace Command to Remove Prefix in Excel

  • From the Find and Replace window, type ID in the Find what box and leave the Replace with box empty.
  • Click on the Replace All box.

  • A new dialog box named Microsoft Excel will pop up with the message All done. We made 10 replacements.
  • Press OK.

  • You will now be able to remove the ID with Empty as shown in the image below.

Use of the Find & Replace Command to Remove Prefix in Excel


Things to Remember

While applying the Flash Fill Command, type the Code of Eraser manually and then go to,

Home → Editing → Fill → Flash Fill

Another way is to use the Ctrl + E as the keyboard shortcut instead of Flash Fill Command.

The keyboard shortcut for applying the Find & Replace method is Ctrl + H.


Download Practice Workbook


Related Articles


<< Go Back to Suffix and Prefix | Text Formatting | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdur Rahim Rasel
Md. Abdur Rahim Rasel

MD. ABDUR RAHIM is a marine engineer proficient in Excel and passionate about programming with VBA. He views programming as an efficient means to save time while managing data, handling files, and engaging with the internet. His interests extend to Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning, reflecting his versatile skill set. He earned a B.Sc in Naval Architecture & Marine Engineering from BUET, and now he has become a content developer, creating technical content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo