How to change mixed case to upper case in Excel for all cells

W

WordAlone Network

I need to change name and address from mixed case to uppercase in the cells
on my Excel spreadsheet - is there a way to do this without retyping
everything?
 
K

Kevin Vaughn

You could use a helper column and the formula =upper(a1) copied down.
If you wanted, you could then copy - paste special values back over the
originals and get rid of the helper column.
 
B

bpeltzer

In a helper column, use the upper function. Ex: insert column B, then in B1
enter the function =upper(a1). Copy that formula down through the rest of
column B. Now copy column B, select column A and Edit > Paste Special,
select Values and click OK. Then delete column B.
Please save before making significant changes! And, personally, I'd ask if
you really, really, really, want to convert to upper case. It's always easy
to convert to upper case as necessary; not so easy to go back (and mixed
case is certainly easier to read).
--Bruce
 
W

WordAlone Network

Thanks - that will work just fine!
Anne

Kevin Vaughn said:
You could use a helper column and the formula =upper(a1) copied down.
If you wanted, you could then copy - paste special values back over the
originals and get rid of the helper column.
 
P

PlayingToAudienceOfOne

Copy the following macro:

Sub Change_Case()
Dim ocell As Range
Dim 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
 
Top