View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Brian Denny Brian Denny is offline
external usenet poster
 
Posts: 18
Default Changing the entire contents of my spreadsheet to uppercase

Ok, how about this. I copied the entire column to a Word page. At the
bottom of the column clicked on the past icon, then selected change style.
From there selected Format, change case, then selected change to uppercase
and ok. Copied the new column with all uppercase and pasted it back to the
excel spreadsheet. Probably the hard way around, but got the job done.
Would still like to know how to run a written macro if you have the time to
explain sometime.

Thanks,
Brian Denny

"Gord Dibben" wrote:

Brian

Macro is easiest for entire sheet.

Just select all cells with CTRL + a(twice in 2003) and run the macro.

Sub Upper_Case()
'David McRitchie, programming, 2003-03-07
Dim rng1 As Range, rng2 As Range, bigrange As Range
Dim cell As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
On Error Resume Next
Set rng1 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeConstants))
Set rng2 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeFormulas))
On Error GoTo 0
If rng1 Is Nothing Then
Set bigrange = rng2
ElseIf rng2 Is Nothing Then
Set bigrange = rng1
Else
Set bigrange = Union(rng1, rng2)
End If
If bigrange Is Nothing Then
MsgBox "All cells in range are EMPTY"
GoTo done
End If
For Each cell In bigrange
cell.Formula = UCase(cell.Formula)
Next cell
done:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Sun, 19 Nov 2006 12:13:01 -0800, Brian Denny <Brian
wrote:

Does anyone know an easy way, or any way to change the entire spreadsheet to
upper case lettering?