Link to home
Start Free TrialLog in
Avatar of randybdavis
randybdavis

asked on

Propercase can't handle apostrophys

When using Propercase on a company's name I get false output if there is an apostrophy in the string.  Example:  From Propercase({CompanyName})  on "JEFF'S FIRM" I get:  "Jeff'S Firm" instead of the assumed correct output: "Jeff's Firm"   Can anybody help with a workaround on this solution?  I tried Replace(Propercase([CompanyName]), "'S","'s"), however, it didn't work.  Any ideas?
Avatar of frodoman
frodoman
Flag of United States of America image

I'm surprised that what you tried didn't work because it does work for me - maybe a difference in versions.

   replace(propercase("Joe's Diner"),"'S","'s")

The above returns "Joe's Diner" exactly as you'd want.  You might want to try forcing the lower case conversion like this:

   replace(propercase({CompanyName}),"'S",lcase("'s"))



frodoman
Avatar of randybdavis
randybdavis

ASKER

Hi frodoman,

I used your code and this is the output:

Company Name (Lessee or Owner): Jeff`S Firm
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey frodoman,

Congradulations,  you won!!!  It was that character under the tilde.

Thank you.  :-)
You're welcome - glad I could help.