View Single Post
  #5   Report Post  
Gord Dibben
 
Posts: n/a
Default

Once again Julie......

FYI and hopefully a tip. Are you aware with that code, if there are any
formulas in the range they will be wiped out leaving values only?

I realize OP mentioned text only but on the odd chance that some of the text
seen may be the results of formulas the following code would not affect
formulas. It will however, change case of any text returned by a formula as
well as in text-only cells.

Just select a range and run code.

Sub Upper_Case()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Selection
cell.Formula = UCase(cell.Formula)
Next
Application.ScreenUpdating = True
End Sub


Gord Dibben Excel MVP

On Fri, 29 Apr 2005 00:38:46 +0800, "JulieD"
wrote:

Hi

will the following code do what you want (always test code on a copy of the
workbook first!)

sub changetoupper()
for each c in Range("A1:A100")
c.value = UCASE(c.value)
next
end sub