Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to change the casing of the letters in an excel cell?

shortcut for changing casing
  #2   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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


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
Excel, how do I change the column headings from letters to number lazybee Excel Discussion (Misc queries) 4 April 2nd 08 07:44 AM
Don't change cell content in Excel by dragging Santegoeds Excel Worksheet Functions 1 October 26th 06 08:23 PM
input 7 in a cell in EXCEL 2000, it will automatically change to 8 nobattery Excel Discussion (Misc queries) 1 October 19th 06 01:25 PM
Enter 1 in a cell, excel change to 0.001, WHY? Jag Excel Worksheet Functions 1 February 3rd 06 03:38 PM
How do i change column headings back to letters in excel? Chris Excel Discussion (Misc queries) 2 April 14th 05 02:10 PM


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