#1   Report Post  
Posted to microsoft.public.excel.misc
Ferd
 
Posts: n/a
Default Change case of text

Is there a 'change case' shortcut found in Excel, similar to the one found in
Office Word - under format?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Change case of text

No, that is a word-processor function. In Excel you would have to create it.
I have a UDF that does sentence case. I am sure it could easily be adapted
to act like Word's F3

Public Function SentenceCase(ByVal para As String) As String
Dim oRegExp As Object
Dim oMatch As Object
Dim oMatches As Object

para = LCase(para)
Set oRegExp = CreateObject("VBScript.RegExp")
oRegExp.Pattern = "^[a-z]|\.( )*[a-z]"
oRegExp.Global = True
Set oMatches = oRegExp.Execute(para)
For Each oMatch In oMatches
With oMatch
Mid(para, .FirstIndex + 1 + .Length - 1, 1) = _
UCase(Mid(para, .FirstIndex + 1 + .Length - 1, 1))
End With
Next oMatch
SentenceCase = para
End Function

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ferd" wrote in message
...
Is there a 'change case' shortcut found in Excel, similar to the one found

in
Office Word - under format?



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
Convert number into words Blackwar Excel Discussion (Misc queries) 4 December 2nd 05 12:05 PM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM
change typed text to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM
How do I change existing text from lower case to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM


All times are GMT +1. The time now is 01:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"