How to get the value from string?

E

Eric

There is text Apple Computers & Components (17704) in Cell A1, and I would
like to separate Text Apple Computers & Components in Cell B1, and to
separate number 17704 in Cell C1. The size of text and number can be any
length, does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
M

Mike H

Hi,

If your numbers are always in parenthesis then this should work

=MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1)

Mike
 
J

Joe Mac

If you are looking to separate the text from the numeric, you can do it with
a set of formulas: the assumption here is that the data is true to your
example and the numeric is always embraced with "( )"
=MID(A1,1,FIND("(",A1,1)-2) will extract the Text from the string into B1
AND
=MID(A1,(FIND("(",A1)+1),(FIND(")",A1,1))-(FIND("(",A1)+1)) will extract the
numeric string into C1

Or you can just use the Data/Text to Columns built in function and key in on
a specific character to delimit the strings, if your example is true to the
data then you can use the "(" as the delimiter... this will require you to
replace the closing ")" with global replace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top