How can I convert text to all lowercase?

H

HBYardSale

How can I convert text to all lowercase?

I know that I can use the Format menu to convert a block of text to all
uppercase, but is there any way to convert it to lowercase?

If not with Excel, how about Word, DOS, any other way.

I'm using Excel 7.0 (Office 95).
Thanks in advance!
 
K

Ken Wright

Don't have Excel 7 so can't test it on that, but try the following. Not the
most efficient way of doing it, but I'm not sure what Excel 7 will support:-

This will do everything on the sheet, but if you prefer to do just a selection,
just change the

For Each cell In ActiveSheet.UsedRange

to

For Each cell In Selection

------------------------------------------------------------

Sub MakeLowercase()

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

For Each cell In ActiveSheet.UsedRange
If cell.HasFormula = False Then
cell.Value = LCase(cell.Value)
End If
Next cell

Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

End Sub
 
P

Peo Sjoblom

Word has that built in, under format>Change Case,
maybe that is what you were thinking of? Excel does not have that built in,
you either have to use
a help column and a formula

=UPPER(A2)

copy down, copy and paste special as values over the old values, delete help
column

or you could run a macro like the one below

Sub UpCase()
Application.DisplayAlerts = False
Dim R As Range
For Each R In Selection.Cells
If R.HasFormula Then
R.Formula = "=UPPER(" & Mid(R.Formula, 2) & ")"
Else
R.Value = UCase(R.Value)
End If
Next
Application.DisplayAlerts = True
End Sub


press Alt + F11, click insert module and paste in the above,
press At + Q to close the VBE, select the text and press Alt + F8 to run the
macro
 
P

Peo Sjoblom

Oops!

Sub LowCase()
Application.DisplayAlerts = False
Dim R As Range
For Each R In Selection.Cells
If R.HasFormula Then
R.Formula = "=LOWER(" & Mid(R.Formula, 2) & ")"
Else
R.Value = LCase(R.Value)
End If
Next
Application.DisplayAlerts = True
End Sub
 
Top