Thread: Convert Case
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Convert Case

This macro should be nicely efficient...

Sub MakeUpperCase()
Dim Cell As Range, CellRange As Range, FirstAddress As String
Set CellRange = Range("A6:B11999")
Set Cell = CellRange.Find("*", SearchDirection:=xlNext)
If Not Cell Is Nothing Then
FirstAddress = Cell.Address
Do
Cell.Value = UCase(Cell.Value)
Set Cell = CellRange.FindNext(Cell)
Loop While Cell.Address < FirstAddress And Not Cell Is Nothing
End If
End Sub

--
Rick (MVP - Excel)


"ordnance1" wrote in message
...
My original post seems to have disappeared so here is a repeat.

I have to clean up a spreadsheet by converting the text in cells A6:B11999
to uppercase text. These cells contain text only. Is there a quick way to
accomplish this?