View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Contains or Includes

See if this does it
=MID(A4,FIND(" ",A4),FIND(" ",RIGHT(A4,LEN(A4)-FIND(" ",A4))))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jim Berglund" wrote in message
...
I'm trying to create a mailing list and have a list containing Mr, Ms,
Miss, Mrs, Dr, etc. Some names have no salutations. I want to use a macro
that looks for the first name if and after one of these surnames occurs.

I tried multiple IF's, as below?

=IF(LEFT(A31,3)="Mrs","Mrs",IF(LEFT(A31,4)="Miss", "Miss",IF(LEFT(A31,2)=OR("Mr","Ms","Dr"),LEFT(A31, 2),"")))

The frst part works for Mrs * Miss, but the OR section gives me a #Value
error.

I there a better way?

Jim Berglund