In this article we will learn how to subdivide a mixed string into separate cells which contain only numbers or characters,we can use the “TRIM”, “LEFT”, “FIND”, and “SUBSTITUTE” functions in Microsoft Excel 2010.
FIND:This function returns the location number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive).
Syntax of “FIND” function: =FIND
Example:Cell A1 contains the text “Broncho Billy Anderson”
=FIND (“Billy”, A1, 1), function will return 9
LEFT: Returns the specified number of characters starting from the left-most character in the string.
Syntax of “LEFT” function: =LEFT (text,[num_chars])
Example:Cell A1contains the text “Broncho Billy Anderson”
=LEFT (A1, 7), function will return “Broncho”
TRIM: Trim function is used to remove additional spaces from the text in a cell.
Syntax of “TRIM” function: =TRIM (text)
Example: Cell A2 contains the text.
SUBSTITUTE:This function is used to replace old text with new text in a cell.
Syntax of “SUBSTITUTE” function:
Example: Cell A2 contains the text “Petrol”
=SUBSTITUTE (A2, A2,”Diesel”)
The function will returnDiesel.
Let’s take an example to understand how we can subdivide a mixed string into separate cells containing only numbers or characters.
Example- The strings in column Aare composed of both numbers and characters. However the numbers appear at the beginning of the string and the characters at the end.
We need to separate the strings into two columns, one containing only numbers and the other containing the characters.
Follow the below given steps:-
To return only the text from cell A2, use the Substitute function as shown in the following formula entered in column C:-
This is howwe can subdivide a mixed string of numbers and characters into separate cells containing only numbers or characters in Microsoft Excel.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.