Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have created a Worksheet in Excel 2000, but would like to format certain
cells so that they show in Uppercase text. Can anyone help with this? Thanks |
#2
![]() |
|||
|
|||
![]()
this might be useful. Suggest putting in personal.xls.
Sub ChangeCase() Application.ScreenUpdating = False Dim r As Range nCase = UCase(InputBox("Enter U for UPPER" & Chr$(13) & " L for lower" & Chr$(13) & " Or " & Chr$(13) & " P for Proper", "Select Case Desired")) Select Case nCase Case "L" For Each r In Selection.Cells If r.HasFormula Then r.Formula = LCase(r.Formula) 'R.Formula = R.Value Else r.Value = LCase(r.Value) End If Next Case "U" For Each r In Selection.Cells If r.HasFormula Then r.Formula = UCase(r.Formula) 'R.Formula = R.Value Else r.Value = UCase(r.Value) End If Next Case "P" For Each r In Selection.Cells If r.HasFormula Then r.Formula = Application.Proper(r.Formula) 'R.Formula = R.Value Else r.Value = StrConv(r.Value, vbProperCase) End If Next End Select Application.ScreenUpdating = True End Sub -- Don Guillett SalesAid Software "TazDevil" wrote in message ... I have created a Worksheet in Excel 2000, but would like to format certain cells so that they show in Uppercase text. Can anyone help with this? Thanks |
#3
![]() |
|||
|
|||
![]()
You can't format a cell to display in upper case, but you can use the
macro at http://www.mvps.org/dmcritchie/excel/proper.htm#upper In article , "TazDevil" wrote: I have created a Worksheet in Excel 2000, but would like to format certain cells so that they show in Uppercase text. Can anyone help with this? Thanks |
#4
![]() |
|||
|
|||
![]() "JE McGimpsey" wrote: You can't format a cell to display in upper case, but you can use the macro at http://www.mvps.org/dmcritchie/excel/proper.htm#upper In article , "TazDevil" wrote: I have created a Worksheet in Excel 2000, but would like to format certain cells so that they show in Uppercase text. Can anyone help with this? Thanks |
#5
![]() |
|||
|
|||
![]()
"TazDevil" wrote...
I have created a Worksheet in Excel 2000, but would like to format certain cells so that they show in Uppercase text. Can anyone help with this? No way to do this by formatting. Only using macros. If you want to do this to appear all-caps immediately after entry, use a Change event handler. First, select the cells that should be all-caps, and give that range the defined name AllCapsRange. Then right-click on the worksheet tab and select View Code from the pop-up menu. Enter the following Change event handler. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, _ Me.Names("AllCapsRange").RefersToRange) Is Nothing Then Exit Sub On Error GoTo ExitProc Application.EnableEvents = False If Not Target.HasFormula And VarType(Target.Value) = vbString Then Target.Value = IIf(Left(Target.Value, 1) Like "[=+]", "'", "") & _ UCase(Target.Value) End If ExitProc: Application.EnableEvents = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change a cell's fill color dynamically? | Excel Discussion (Misc queries) | |||
How to get excel cells to change colors depending on value | Excel Worksheet Functions | |||
How to change text in multiple cells from Uppercase to proper cas. | Excel Worksheet Functions | |||
How do I change an Excel range of cells from relative to absolute. | Excel Worksheet Functions | |||
How to change the width on individual cells | Excel Worksheet Functions |