View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Billy Liddel Billy Liddel is offline
external usenet poster
 
Posts: 527
Default How to change the casing of the letters in an excel cell?



"Syed Mohideen" wrote:

shortcut for changing casing


Syed

No shortcut in Excel I'm afraid. You have to use functions

Proper(This Is the Text Result)
Lower(this is the text result)
Upper(THIS IS THE TEXT RESULT)

To change the text in place you woud have to use a macro similar to this:

Sub changeCase()
Dim rsp, c
rsp = InputBox("Enter U, P or L to choose Upper, Proper or Lower case")
For Each c In Selection
If UCase(rsp) = "U" Then
c.Value = UCase(c)
ElseIf UCase(rsp) = "P" Then
c.Value = Application.WorksheetFunction.Proper(c)
ElseIf UCase(rsp) = "L" Then
c.Value = LCase(c)

End If
Next
End Sub

You can assign a shortcut to the macro for ease of use.

Regards
Peter