<TABLE style="WIDTH: 522pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=696><COLGROUP><COL style="WIDTH: 522pt; mso-width-source: userset; mso-width-alt: 16197" width=696><TBODY><TR style="HEIGHT: 87.75pt; mso-height-source: userset" height=117><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 522pt; HEIGHT: 87.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=117 width=696>I use the following script for title case, however it doesn't work correctly as follows.
Words that have an (') in them come out incorrectly as follows.
Initial dummy sentence.
title case has it's problems i'll, i've, doesn't
ends up as.
Title Case Has It'S Problems I'Ll, I'Ve, Doesn'T
Should end up as
Title Case Has It's Problems I'll, I've, Doesn't
</TD></TR></TBODY></TABLE>
Code:
[FONT=Arial]Sub Test()[/FONT]
[FONT=Arial]For Each cell In Selection[/FONT]
[FONT=Arial]cell.Value = Application.WorksheetFunction.Proper(cell.Value)[/FONT]
[FONT=Arial]Next cell[/FONT]
[FONT=Arial]End Sub[/FONT]
Words that have an (') in them come out incorrectly as follows.
Initial dummy sentence.
title case has it's problems i'll, i've, doesn't
ends up as.
Title Case Has It'S Problems I'Ll, I'Ve, Doesn'T
Should end up as
Title Case Has It's Problems I'll, I've, Doesn't
</TD></TR></TBODY></TABLE>