Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Excell should have a sentence case function like the UPPER() and LOWER()
functions. Word does this under format, chance case. |
#2
![]() |
|||
|
|||
![]()
Excel is for numbers
Word is for text See functions PROPER, UPPER & LOWER best wishes -- Bernard Liengme www.stfx.ca/people/bliengme remove CAPS in email address "JBTaylor29" wrote in message ... Excell should have a sentence case function like the UPPER() and LOWER() functions. Word does this under format, chance case. |
#3
![]() |
|||
|
|||
![]()
Hi
not sure but is PROPER() something for you? -- Regards Frank Kabel Frankfurt, Germany "JBTaylor29" schrieb im Newsbeitrag ... Excell should have a sentence case function like the UPPER() and LOWER() functions. Word does this under format, chance case. |
#4
![]() |
|||
|
|||
![]()
PROPER is not Sentence Case.
OP would have to use VBA for Sentence Case. Sub Sentence_Case() Dim myStr As String Dim cel As Range For Each cel In Selection If cel.HasFormula = True Then Exit Sub myStr = cel.Value cel.Value = "=CapFirst(" & """" & myStr & """" & ")" cel.Select Selection.Copy Selection.PasteSpecial Paste:=xlValues Application.CutCopyMode = False Next cel End Sub Function CapFirst(ByVal str As String) As String Dim aRegExp As Object, aMatch As Object, allMatches As Object Set aRegExp = CreateObject("vbscript.regexp") aRegExp.Pattern = "^[a-z]|\.( )*[a-z]" aRegExp.Global = True Set allMatches = aRegExp.Execute(str) For Each aMatch In allMatches With aMatch Mid(str, .firstindex + 1 + .length - 1, 1) = _ UCase(Mid(str, .firstindex + 1 + .length - 1, 1)) End With Next aMatch CapFirst = str End Function Gord Dibben Excel MVP On Thu, 11 Nov 2004 21:39:21 +0100, "Frank Kabel" wrote: Hi not sure but is PROPER() something for you? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Amount or Numbers in Words | New Users to Excel | |||
Identifying the Active Fill Color | Excel Discussion (Misc queries) | |||
changing lower case to upper case | Excel Discussion (Misc queries) | |||
How do I change existing text from lower case to upper case | Excel Discussion (Misc queries) | |||
Help With The Upper Function | Excel Worksheet Functions |