Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Propercase can't handle apostrophys

Posted on 2006-06-16
5
Medium Priority
?
517 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:randybdavis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 16922888
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
0
 

Author Comment

by:randybdavis
ID: 16923036
Hi frodoman,

I used your code and this is the output:

Company Name (Lessee or Owner): Jeff`S Firm
0
 
LVL 42

Accepted Solution

by:
frodoman earned 2000 total points
ID: 16923118
Are you certain that the apostrophe is really an apostrophe?  For example, could it be the accent mark that's normally under the tilde (~) on the keyboard?  Although in many fonts they look identical the ascii code for them is different so your replace won't find it unless you use the same accent character in your formula.

frodoman
0
 

Author Comment

by:randybdavis
ID: 16923172
Hey frodoman,

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

Thank you.  :-)
0
 
LVL 42

Expert Comment

by:frodoman
ID: 16923247
You're welcome - glad I could help.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question