Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
=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 |
#4
|
|||
|
|||
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 |
#5
|
|||
|
|||
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 |
#6
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looking up a string of text within a string of text | Excel Worksheet Functions | |||
Auto convert an alphanumeric string (CIS9638S) to numbers only? | Excel Worksheet Functions | |||
Inserting Filtered RC cell information into other worksheets | Excel Discussion (Misc queries) | |||
How do I use 3 cells to create the string for a lookup function? | Excel Worksheet Functions | |||
Finding Specific Text in a Text String | Excel Worksheet Functions |