How to remove a text string or characters from a cell when the text is at a specific position. And this post will guide you how to remove a text string from a cell or column that the removed text is at a variable position in excel.
Table of Contents
Combining the Replace Function with Text Function to Remove Text
You can use FIND function to get the position of the specified character within the text string, and then combining within REPLACE function to remove the text. For example:
=FIND("-"B1)
In the above formula, the FIND function will return the position of hyphen character (-) from the cell B1.
The Excel REPLACE function replaces all or part of a text string with another text string
The syntax of the REPLACE function is as below:
= REPLACE(old_text, start_num, num_chars, new_text)
If you want to remove the characters before the hyphen character, then you need use FIND function to get the position of hyphen in the text, then combine with the REPLACE function and then we can write down the below formula:
=REPLACE(B1,1,FIND("-",B1),"")
To remove text, you can use an empty string as “new_text” argument in REPLACE function.
Related Formulas
- Combining the Replace function with Text function in Excel
we can use Replace function in combination with Text function to replace date characters that are part of the text string in excel…
- Excel Replace function with numeric values
how to replace a numeric characters within a text string using another numeric characters. This post will guide you how to use REPLACE function to replace numeric characters using another numeric characters in one text string….
Related Functions
- Excel Replace function
The Excel DATE function returns the serial number for a date.The syntax of the DATE function is as below:= DATE (year, month, day) … - Excel Find function
The Excel FIND function returns the position of the first text string (substring) from the first character of the second text string. The FIND function is a build-in function in Microsoft Excel and it is categorized as a Text Function….
Leave a Reply
You must be logged in to post a comment.