![]() |
How to change the casing of the letters in an excel cell?
shortcut for changing casing
|
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 |
How to change the casing of the letters in an excel cell?
Syed
Note that Billy's macro will destroy any formulas you may have in the range and turn them into values only. If you might have formulas in the selected range, change to................. 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.Formula = UCase(c.Formula) ElseIf UCase(rsp) = "P" Then c.Formula = Application.WorksheetFunction.Proper(c.Formula) ElseIf UCase(rsp) = "L" Then c.Formula = LCase(c.Formula) End If Next End Sub Gord Dibben MS Excel MVP On Thu, 30 Nov 2006 23:49:00 -0800, Billy Liddel wrote: "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 |
All times are GMT +1. The time now is 11:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com