+ Reply to Thread
Results 1 to 6 of 6

Change Capitals to Sentence Case

  1. #1
    do
    Guest

    Change Capitals to Sentence Case

    May I know how to change a sentence in capitals to only the first letter is
    in capital and the rest to lower case

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Assuming that your query is excel related, and the sentence is in cell A1, then use:
    =UPPER(LEFT(A1,1))&LOWER(RIGHT(A1,LEN(A1)-1))

    - Mangesh

  3. #3
    Kassie
    Guest

    RE: Change Capitals to Sentence Case

    Change All Caps to Sentence Case

    Sub AAA()
    Dim Rng As Range
    For Each Rng In ActiveSheet.UsedRange.SpecialCells( _
    xlCellTypeConstants, xlTextValues)
    Rng.Value = UCase(Left(Rng.Text, 1)) & Mid(Rng.Text, 2)
    Next Rng
    End Sub


    "do" wrote:

    > May I know how to change a sentence in capitals to only the first letter is
    > in capital and the rest to lower case


  4. #4
    David McRitchie
    Guest

    Re: Change Capitals to Sentence Case

    Hi Kassie,
    See the entire discussion thread and code modified from Nate Oliver's coding
    http://groups.google.co.uk/groups?th...TNGP15.phx.gbl

    You should be able to see the entire code okay in the above, if you look for "view the rest of this message",
    but you may look more directly at the code with the following link:
    http://groups.google.co.uk/groups?se...&output=gplain
    which won't mess up coding because it is plain text. Viewing code did not
    used to be a problem but Google is messing things up royally with their
    ad-sense and other nonsense..

    If not familiar with macros see
    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    The previous solution in this thread requires a lot of extra work on your part to get
    back to one column for the data, and it *only* capitalizes the first character in the
    cell. The macro posted above will capitalize first letter in all sentences within a cell,
    and by special request includes the word "I".
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "Kassie" <Kassie@discussions.microsoft.com> wrote in message news:630CC653-1896-435E-9DCE-2E44ED32FD90@microsoft.com...
    > Change All Caps to Sentence Case
    >
    > Sub AAA()
    > Dim Rng As Range
    > For Each Rng In ActiveSheet.UsedRange.SpecialCells( _
    > xlCellTypeConstants, xlTextValues)
    > Rng.Value = UCase(Left(Rng.Text, 1)) & Mid(Rng.Text, 2)
    > Next Rng
    > End Sub
    >
    >
    > "do" wrote:
    >
    > > May I know how to change a sentence in capitals to only the first letter is
    > > in capital and the rest to lower case




  5. #5
    Forum Contributor
    Join Date
    07-16-2009
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Change Capitals to Sentence Case

    I am looking at the formula/macro and want a little help with how I could adjust it to add in a Range that I have as a defined name. In my case I defined the range as "comments".

    Tried changing it to because my activesheet is called ServiceDeliveryTemplate and the defined name is Comments but I am not selecting the range correctly.

    Sub AAA()
    Dim Rng As Range
    For Each Rng In ServiceDeliveryTemplate.Comments.SpecialCells(xlCellTypeConstants, xlTextValues)
    Rng.Value = UCase(Left(Rng.Text, 1)) & Mid(Rng.Text, 2)
    Next Rng
    End Sub

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Change Capitals to Sentence Case

    this thread is over 5 years old! please start a new one of your own linking to this if necessary
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1