Changing the case of items in a column

  • Thread starter Thread starter John
  • Start date Start date
J

John

How can I quickly change a column with 33 items that are
all lowercase to uppercase lettering?

Thank you.
 
Here's a neat procedure that's good to keep handy:

Sub TextCon()
'code by Ivan F. Moala
Dim ocell As Range, ans As String

ans = Application.InputBox("Type in Letter" & vbCr & _
"(L)owercase, (U)ppercase, (S)entence, (T)itles ")
If ans = "" Then Exit Sub

For Each ocell In Selection.SpecialCells(xlCellTypeConstants, 2)
Select Case UCase(ans)
Case "L": ocell = LCase(ocell.Text)
Case "U": ocell = UCase(ocell.Text)
Case "S": ocell = UCase(Left(ocell.Text, 1)) & _
LCase(Right(ocell.Text, Len(ocell.Text) - 1))
Case "T": ocell =
Application.WorksheetFunction.Proper(ocell.Text)
End Select
Next

End Sub

Smitty
 
Otto,
It does.

John

-----Original Message-----
Say your data is in Column A starting in A1. Insert a blank column B or use
an empty column to the right of all your data. Doesn't matter which. I'll
use Column B.
In B1 type "=UPPER(A1)" without the quotes.
Drag this down as far as Column A has data.
Select all the cells with data in Column B.
Do Edit - Copy.
Select A1.
Do Edit - Paste Special and click on Values.
Delete Column B.
HTH Otto



.
 
Back
Top