ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   String (https://www.excelbanter.com/excel-discussion-misc-queries/50311-string.html)

Access Front End

String
 
Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan

Kevin Lehrbass

Hi Ngan,

I have a free download on my website which shows you have to do this. There
are also many other excel websites with text formulas and text downloads. Do
a search "excel separate lastname, firstname".

Cheers,
--
Kevin Lehrbass
www.spreadsheetsolutions4u.com


"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan


Bob Phillips

=LEFT(A1,Find(" ",A1)-1)
and
=RIGHT(A1,LEN(A1)-FIND(" ",A1)-1)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Access Front End" wrote in
message ...
Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First

name
then comma some time a space then Last Name. How can I get the Firstname

in
one column & Last name in one column by using the formula. Thanks

Ngan




Kevin Lehrbass

Hi Again,

I found the formula for you.
Extract last word: =RIGHT(A1,LEN(A1)-FIND(" ",A1,1))
Extract first word: =LEFT(A1,FIND(" ",A1)-2)


--
Kevin Lehrbass
www.spreadsheetsolutions4u.com


"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan


B. R.Ramachandran

Hi,

If a comma separates the first and last names, and also some entires contain
a space after the comma, use the following formulas in B1 and C1 to extract
the first and last parts respectively (change the 'A1's appropriately).

=LEFT(A1,FIND(",",A1)-1)
=TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)))


Regards,
B. R. Ramachandran



"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan


Access Front End

Thank You ALL

Ngan

"B. R.Ramachandran" wrote:

Hi,

If a comma separates the first and last names, and also some entires contain
a space after the comma, use the following formulas in B1 and C1 to extract
the first and last parts respectively (change the 'A1's appropriately).

=LEFT(A1,FIND(",",A1)-1)
=TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)))


Regards,
B. R. Ramachandran



"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan



All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com