LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Contains or Includes

Thanks, that works!
Jim
"Alan Beban" wrote in message
...
Jim Berglund wrote:
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

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

Alan Beban


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter includes extra row George Gee New Users to Excel 4 August 26th 09 12:31 AM
average that includes estimates if data not available BillyRogers Excel Worksheet Functions 2 September 10th 07 08:53 PM
Using a macro that includes 2 worksheets Richard Champlin Excel Discussion (Misc queries) 3 August 24th 07 10:51 PM
Getting a range that includes alternate rows only [email protected] Excel Programming 3 May 19th 07 06:25 PM
=max(range includes #N/As) David Excel Worksheet Functions 3 September 14th 05 05:00 PM


All times are GMT +1. The time now is 07:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"