• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Fixed Capitalization

Kathryn Domres

New Member
How do I automatically program a cell to change all text typed into it to begin with a capital letter and all other letters to be lower case? Ex. I type HELLO in upper case and the cell automatically converts it to Hello once you press enter.

Look forward to hearing from you.

Thanks
 
Hi Kathyrn ,

The only way this can happen automatically is if you use VBA ; you can make use of the Worksheet_Change event procedure to convert anything that you type into a cell ( as long as it is text ) , using an Excel function called PROPER ; this is also a worksheet function ; so if your text is in cell A1 , if you enter the formula =PROPER(A1) in any other cell , that cell will display the same text in Proper case.

Narayan
 
In case you are finding it hard to figure out Narayan's VBA suggestion, this is what he meant

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    Dim rng As Range
    For Each rng In Target
        If Not IsEmpty(rng) Then
            rng.Value = Application.Proper(rng.Value)
        End If
    Next rng

End Sub
 
Thanks, Narayan. The VBA is what I would be looking for but have no idea how to do it. For the time being your suggestion has worked just great. Thanks for getting back to me so fast!

Also, Sam, thanks for the info......but I am still not sure how to use it. Need to do a little research there for sure. Thanks for your response too!
 
Back
Top