Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default Ignore "-"

I have a script that generates acronyms from company names. It was set it up
to ignore of, and, the, etc. (I didn't code it just spec'd it)

If Not (UCase(prom) = "OF") And Not (UCase(prom) = "FOR") And Not
(UCase(prom) = "THE") And _
Not (UCase(prom) = "AND") And Not (UCase(prom) = "A") And
Not (UCase(prom) = "ON") And Not (prom) = "-" Then

The problem is I need it to also ignore hyphens so for instance

Society for Maternal-Fetal Medicine

becomes

SMFM

I tried adding a hyphen to the code above (w/o UCASE) but it doesn't work.

Anyway I can do this without having to remove the hyphens themselves?
 
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
Get "AVERAGE" function to ignore empty cells Ed O'Brien Excel Discussion (Misc queries) 6 August 5th 09 10:07 PM
How do I get Excel to ignore "a", "an", "the" when sorting? Sedro6 Excel Discussion (Misc queries) 1 March 28th 09 11:09 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I ignore the "Number stored as text" error message permane. reston33 Excel Discussion (Misc queries) 2 March 28th 07 02:59 AM
Ignore "a(n)", "the" in A-Z sort jmj713 Excel Discussion (Misc queries) 3 November 17th 06 08:40 AM


All times are GMT +1. The time now is 04:47 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"