View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Text in a file downloaded to excel

Excel has UPPER, LOWER and PROPER functions.

e.g. QWERTY in A1

=PROPER(A1) returns Qwerty

To do a great many of these at once you could use VBA macro to change the Case.

The macro below will change to Proper Case

Sub optProper_Click()
'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 = Application.Proper(cell.Formula)
Next cell
done:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On 11 Apr 2007 12:45:00 -0700, wrote:

I download information from outside sources into a .CSV file, which I
then save as an EXCEL file. The information contains large quantities
of text - which in its original format is all caps. Once I download
it, or as I am downloading and saving - is there anyway I can format
the cells to first letter cap only?