Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Right Text - Variable Find
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) |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Right Text - Variable Find
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 "Karin" wrote in message ... 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) |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Right Text - Variable Find
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) -- Regards Roger Govier "Karin" wrote in message ... 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) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find a variable text string | Excel Discussion (Misc queries) | |||
3 variable find and replace | Excel Discussion (Misc queries) | |||
How do I find the last row of data and then use that as a variable | New Users to Excel | |||
Variable control tip text | Excel Discussion (Misc queries) | |||
Putting text in a column based on variable text from another colum | Excel Discussion (Misc queries) |