Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
TazDevil
 
Posts: n/a
Default How do I change certain cells to Uppercase

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   Report Post  
Don Guillett
 
Posts: n/a
Default

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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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   Report Post  
danlmac7
 
Posts: n/a
Default



"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   Report Post  
Harlan Grove
 
Posts: n/a
Default

"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
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
Change a cell's fill color dynamically? Arlen Excel Discussion (Misc queries) 2 January 22nd 05 09:51 PM
How to get excel cells to change colors depending on value KV Excel Worksheet Functions 2 November 25th 04 09:50 AM
How to change text in multiple cells from Uppercase to proper cas. Excel help Excel Worksheet Functions 1 November 17th 04 03:45 AM
How do I change an Excel range of cells from relative to absolute. Jrhenk Excel Worksheet Functions 2 November 15th 04 10:55 PM
How to change the width on individual cells TemporarilyConfused Excel Worksheet Functions 1 November 10th 04 07:34 PM


All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"