View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
CLR
 
Posts: n/a
Default Extracting First Name

The formula will return #VALUE! if cell A1 is empty, or if it contains a
number. I understood it was to contain something like "Bond, James P.", and
you wanted only the "James" part extracted. It's a fairly long formula,
perhaps email word-wrap messed it up......it all goes in one cell.

Vaya con Dios,
Chuck, CABGx3



"Ruan" wrote:

I am getting "#VALUE!" error.


"CLR" wrote in message
...
=MID(A1,FIND(" ",A1,1)+1,FIND(" ",A1,FIND(" ",A1,1)+1)-FIND(" ",A1,1)-1)

Vaya con Dios,
Chuck, CABGx3



"Ruan" wrote:

Hello,

I was able to extract the Last Name from a string, however I am having
difficulties extracting the First Name, especially when there is a Middle
Initial involved.

Example: Bond, James P.

I just need to extract "James".

Here is my formula I used for extracting the Last Name -
=UPPER(IF(ISNUMBER(FIND(",",A1)),TRIM(LEFT(A1,FIND (",",A1)-1)),TRIM(LEFT(A1,FIND("
",A1)-1))))


Thanks
Ruan