Remove text based on variable position in Excel
This tutorial explains how to remove text or characters from a cell when it locates in variable position.
How to remove text from a cell based on variable position?
How to use this formula?
As the below screenshot shown, how to keep only the texts right after the colon and remove the other unneeded characters?
1. Select a blank cell to output only the texts right after the colon.
2. Enter the below formula into it and press the Enter key.
3. Select the result cell and drag the Fill Handle to apply the formula to other cells. See screenshot:
Tips: If there is a space after the colon, to remove it as well, please apply the below formula.
How this formula works?
- 1. FIND(":",B3): The FIND function finds the position of colon in B3. Here it returns 8 because “:” is the eighth character in the text string “Product: KTE”.
- 2. REPLACE(B3,1,8,""): And then the REPLACE function will replace 8 characters which start with the first character of the text string in B3 with an empty string. Finally it returns “ KTE”.