help with get just the name out

rcirone

Active Member
Joined
Mar 12, 2009
Messages
483
Office Version
  1. 365
Platform
  1. Windows
I have this and I need to get the first and last name out so I can use them for a vlookup please help

Richard XXXXXX 1993446666
Tom XXXXXXX 1993444444

I am using this
=RIGHT(G7,SEARCH("",G7,10))
but I need to use the name now
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Assuming there's always a 10-digit number at the end:
Excel Workbook
AB
1Richard XXXXXX 1993446666Richard XXXXXX
2Tom XXXXXXX 1993444444Tom XXXXXXX
Sheet9
 
Upvote 0
Hi,

If we're assuming there's Always a 10 digit number at the end that we Don't want, then we don't need the SEARCH?

=TRIM(LEFT(A1,LEN(A1)-10))

Edit:

Also, if the formula in OP's post #1 is to extract the 10 digit number, then shouldn't it be just:

=RIGHT(G7,10)

May be I'm mis-understanding....
 
Last edited:
Upvote 0
how can I add a , to the names just after the name like
Richard, XXXXXX 1993446666
Tom, XXXXXXX 1993444444
 
Upvote 0
how can I add a , to the names just after the name like
Richard, XXXXXX 1993446666
Tom, XXXXXXX 1993444444

Do you mean After extracting the name? Or just like you have it in Post #4 with the numbers?
 
Last edited:
Upvote 0
Here's both:


Book1
ABC
1Richard XXXXXX 1993446666Richard, XXXXXXRichard, XXXXXX 1993446666
2Tom XXXXXXX 1993444444Tom, XXXXXXXTom, XXXXXXX 1993444444
Sheet201
Cell Formulas
RangeFormula
B1=SUBSTITUTE(TRIM(LEFT(A1,LEN(A1)-10))," ",", ",1)
C1=SUBSTITUTE(A1," ",", ",1)


Formulas copied down.
 
Upvote 0
That work great but I have one more thing to ask how can I add (ICE) at the end.
Richard, XXXXXX ICE

Thanks for all your help
 
Upvote 0
Like this:


Book1
AB
1Richard XXXXXX 1993446666Richard, XXXXXX ICE
2Tom XXXXXXX 1993444444Tom, XXXXXXX ICE
Sheet201
Cell Formulas
RangeFormula
B1=SUBSTITUTE(TRIM(LEFT(A1,LEN(A1)-10))," ",", ",1)&" ICE"
 
Upvote 0
Thank you so much for your help I have it all done. and now my boss which is nuts like me to swap the first and last name now.
 
Upvote 0
Will there be Last names with 2 words?

Perhaps you should show 5 to 10 samples of possible data, and show the results you want.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top