Right Text - Variable Find

G

Guest

Hi, I was trying to extract a variable amount of information from the right
in a text cell. I saw a response that used programming, but I'm not a
programmer. I found this method:

Smith, Joe (in column A, line 2)

To get the last name (in column B, line 2): =MID(A2,1,FIND(",",A2,1)-1)
(Returns Smith)

To get the first name is trickier -- I needed three additional columns to
get it.
Column D, Line 2 =LEN(A2) (returns 10)
Column E, Line 2 =FIND(",",A2,1)+1 (returns 7)
Column F, Line 2 =D2-E2 (returns 3)

In Column C (where I want the first name) =RIGHT(A2,F2)
 
P

PCLIVE

With the name in A1:
To get the first name:
=RIGHT(A1,LEN(A1)-(FIND(",",A1)+1))

To get the last name:
=LEFT(A1,FIND(",",A1)-1)

HTH,
Paul
 
R

Roger Govier

Hi Karin

You can combine all those into one formula if you wish
=RIGHT(A2,LEN(A2)-FIND(",",A2,1)+1)
or you could use
=MID(A2,FIND(",",A2,1)+1,255)
 

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