< Go Back

Remove text by variable position

You can remove text by variable position in Excel. To do this you need to use the FIND and REPLACE functions. In this tutorial, you will learn how you can remove text by variable position in Excel.

How to Remove Text by Variable Position

You can nest a FIND function inside a REPLACE function to remove text that does not have a fixed position. The generic formula looks like this:

=REPLACE(text,start_index,FIND(character_to_replace,text),””)

Here, You nest a FIND function inside a REPLACE function. The REPLACE function follows the syntax. =REPLACE (previous_text, start_num, num_chars, new_text). Here you are providing the text that you want to replace as the previous_text, the start_index is the start_num which represents the position to start looking for the value. You nest a FIND function as the num_chars argument. The FIND function looks for the text to replace in the text that you are applying the operations. Finally, the empty string (“”) is used as the new_text that you will replace the old one with.

Example

The following example contains an entry from a product inventory database. Here you have the properties for an espadrille. Column A has the properties for the shoe. You will replace the property names with an empty string and have the values only. To do this:

  • Go to cell B2.
  • Assign the formula =REPLACE(A2,1,FIND("-",A2),"") to cell B2.
  • Press Enter to apply the formula to B2.
  • Drag the formula from B2 to B6 to have the property values in column B.

              Figure 1. Example of Removing Text by Variable Position

This will show the property values in column B.

Many functions can remove text in Excel. But to remove text by variable position, you need to use the combination of the FIND and REPLACE functions. This makes it very easy to remove text that does not have a fixed position.

 

Our customers love us!
“The expert was absolutely amazing and stuck with me the whole way through. They were polite, patient, seemed to want to genuinely help me and provided a solution that I would never have managed otherwise. I could not be more thankful for their support and solution. Thank you!” - - Chris T, in California

Leave a Comment

avatar