Extracting Data from a string of text in a cell

S

swalker

I need to extract all the characters to the right of another character (^).
This (^) character appears in every cell of the column I am working with. It
can appear in differnent places within the text of the cell. For example, one
cell can have the test "12345^ABC" and another cell can have the tesxt
"1234567^ABCDEF". In the first case, I need to extract the "ABC" and the
second I need to extract the "ABCDEF". Once extracted I want to put the
information into a column next to the original text. Please advise the best
way to do this.
 
M

M Kan

=MID(cell_ref,FIND("^",cell_ref,1)+1,10)

Assuming the text string you want to return isn't > 10 characters long. YOu
could easily expand this though.
 
R

robzrob

I need to extract all the characters to the right of another character (^).
This (^) character appears in every cell of the column I am working with.It
can appear in differnent places within the text of the cell. For example,one
cell can have the test "12345^ABC" and another cell can have the tesxt
"1234567^ABCDEF". In the first case, I need to extract the "ABC" and the
second I need to extract the "ABCDEF". Once extracted I want to put the
information into a column next to the original text. Please advise the best
way to do this.

=RIGHT(A1,LEN(A1)-FIND("^",A1))
 
P

Pete_UK

If your text is in A1, put this in B1:

=RIGHT(A1,LEN(A1)-FIND("^",A1))

and copy down the column.

Hope this helps.

Pete
 
M

Mark

It is a bit tricky to the right. =RIGHT needs the number of characters
needed to the right or to the end of the string. So needs a more extensive
function, but I'm running out of time now.

To the left would be easy using in column B =LEFT(A1,SEARCH("^",A1)-1)

Cheers, Mark
 

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