Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Shrikant
 
Posts: n/a
Default Sentence with first letter in Capital, rest all in small.

How to convert (from all caps sentence) the first letter of the sententence
to Capital and the rest all in small - just like we write ordinary English
language. The 'Proper( )' function converts to Capital the first letter of
each word in the sentence. This does not serve the purpose.
--
Shrikant
  #3   Report Post  
Sukhjeet
 
Posts: n/a
Default

Shrikant
Use this formula in B1, assuming the sentence to be converted is in A1
=UPPER(LEFT(A1))&LOWER(MID(A1,2,LEN(A1)))
Sukhjeet

"Shrikant" wrote:

How to convert (from all caps sentence) the first letter of the sententence
to Capital and the rest all in small - just like we write ordinary English
language. The 'Proper( )' function converts to Capital the first letter of
each word in the sentence. This does not serve the purpose.
--
Shrikant

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Here is a UDF

Private 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


Use like

=SentenceCase(A1)

--

HTH

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


"Shrikant" wrote in message
...
How to convert (from all caps sentence) the first letter of the

sententence
to Capital and the rest all in small - just like we write ordinary English
language. The 'Proper( )' function converts to Capital the first letter

of
each word in the sentence. This does not serve the purpose.
--
Shrikant



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 Text (letter) To Number Excel reloadinternet Excel Worksheet Functions 2 August 22nd 05 03:49 PM
numerical value of a letter Graeme Excel Worksheet Functions 1 July 20th 05 10:21 AM
how do I convert text in excel to 1st letter capital,only jmfp Excel Worksheet Functions 1 June 16th 05 08:11 PM
Change Capitals to Sentence Case do Excel Discussion (Misc queries) 2 March 29th 05 02:31 AM
Have A Letter Reference A Name For An Intoduction travelersway New Users to Excel 2 February 16th 05 05:47 PM


All times are GMT +1. The time now is 05:19 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"