View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Code to concat "Jo Smith" and "Ja Smith" if there are multiple "J Smiths"

Creating a rule for the 2nd letter when all letters match would be the
tricky part. Even if you choose the last letter in the name if all letters
match you would get Rv and Re or Dl and De. In my example with Dl & De how
could you tell one from the other? What if all letters match including the
last letter?
Rose
Roseanne
Both would Re. Again, how would you tell them apart?
Now you would need two rules in an "IF" statement. What if there are more
than 2 similar names to distinguish from?
Rose
Roseanne
Rosanna
Roanna
The logic would be mind boggling trying to deal with all names that are
similar and all the spelling possibilities that a parent can create to make
their child unique, and still get a result that has some meaning or
relationship to the real name. Even if you come up with a MegaRule to cover
all possibilities, that result still would not be consistent for a
particular name. Rose would be Re when compared with Roseanne, but when
compared to Roanna it would be Rs, which would then break the rule for
Roseanne, etc......
IMHO, way too complicated to tackle with Excel.

Mike F

"Arnold" wrote in message
oups.com...
Thanks for replying

Good--you gave an even better example with Daniel vs. Danielle. The
reason for doing this is for space and traditional-saving business, but
I would also just like to know how.

Is it possible for code to compare 2 or more firstnames in a range
letter by letter and, in cases like Daniel and Danielle and Rosette and
Roosevelt, automatically choose the first capital letter followed by a
different second letter? This would be cool.