Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JBTaylor29
 
Posts: n/a
Default Excell should have a sentence case function like the UPPER() and .

Excell should have a sentence case function like the UPPER() and LOWER()
functions. Word does this under format, chance case.
  #2   Report Post  
Bernard Liengme
 
Posts: n/a
Default

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   Report Post  
Frank Kabel
 
Posts: n/a
Default

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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
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
Amount or Numbers in Words ron New Users to Excel 6 December 24th 04 07:32 PM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM
changing lower case to upper case T. Campbell Excel Discussion (Misc queries) 1 December 8th 04 05:37 PM
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
Help With The Upper Function Dmorri254 Excel Worksheet Functions 3 November 5th 04 08:22 PM


All times are GMT +1. The time now is 09:00 PM.

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"