Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Sentence Capitalization - Revisited

Hey Skinman,

Thanks for the reply.

My confusion over why the sentence caps were working except for the
first sentence has been enlightened. I had accidentally turned on
AutoCorrectCapitalize first letter of sentences. Strangely enough,
since it did not see any spaces in front of the first letter, it just
ignored it.

I was able to get jindons vbscript code to do the first letter (it was
supposed to do all of the sentences not just the first). With the
AutoCorrect active and jindon's code in the Worksheet_Change event,
the named ranges is capitalizing the way it should, with some minor
glitches.

Your idea of using a helper column does have some merit, just not in
this case.

Again, thanks for the effort.

-Minitman


On Thu, 10 Jul 2008 15:02:09 +1000, "Skinman"
wrote:

This macro will capitalize the first word. Just click on the merged cell
that you want to capitalize and run the macro. If your data uses more than
50 columns
you will need to change all the 50's to a higher number. If this is not what
you want, the formula for making the first word a capital is :-
"=UPPER(LEFT(RC[50]))&RIGHT(LOWER(RC[50]),LEN(RC[50])-1)" Hope this
helps.


Sub FirstLetterCapital()
Application.ScreenUpdating = False
ActiveCell.Range("A1:D1").Select
Selection.Copy
ActiveCell.Offset(0, 50).Range("A1:D1").Select
ActiveSheet.Paste
ActiveCell.Offset(0, -50).Range("A1:D1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=UPPER(LEFT(RC[50]))&RIGHT(LOWER(RC[50]),LEN(RC[50])-1)"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 50).Range("A1:D1").Select
Application.CutCopyMode = False
Selection.ClearContents
ActiveCell.Offset(0, -50).Range("A1:D1").Select
Application.ScreenUpdating = True
End Sub


"JLGWhiz" wrote in message
...
Post the code you are trying.

"Minitman" wrote:

Greetings,

I thought this was completed, boy was I wrong!

The problem is solved for the UserForm TextBoxes. However, I can't
seem to get that code to work for worksheet merged cell named ranges.

I am not even sure where to put the code.

So the question is, how do I get these four merged cell named ranges
to format with the first letter of each sentence being capitalized?

Any help will be appreciated.

-Minitman


Reply
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
Capitalization Mike H. Excel Discussion (Misc queries) 1 May 21st 10 04:45 PM
Add-in name capitalization? M. Authement Excel Programming 0 June 16th 06 04:51 PM
Capitalization Patty Excel Discussion (Misc queries) 2 February 20th 06 07:29 PM
Capitalization? everlong Excel Worksheet Functions 2 February 2nd 06 01:45 AM
Capitalization shelly johnson Excel Discussion (Misc queries) 2 December 10th 05 09:23 PM


All times are GMT +1. The time now is 09:26 AM.

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"