Convert lc to UC in rows of spreadsheet

C

Cammie

I've inadvertently entered a bunch of data in mixed lc/UC
and it needs to be converted to all UC on multiple lines
of a spreadsheet -- is there an easier fix than rekeying???
 
D

Don Guillett

Sub TextConvert() 'Better than mine
'By Ivan F Moala
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
 
D

Dave R.

you can use =UPPER(A1) to convert text to upper case in C1. If you have a
bunch of cells to do this with, go to a new,blank worksheet and type
=UPPER(Sheet1!A1) (this assumes the sheet you want capitalized is Sheet1)
then copy that formula over and down as far as you want. Then copy and paste
the contents of the sheet special as text.
 
G

Guest

Column a is lower case in column b =upper(a1) or vise
versa =lower(a1)

Hope it works.
Lou
 
G

Guest

Also Cammie ensure when you use the formula you copy the
cells and paste values into the formula cell after
conversions done.

Lou
 
T

Ted

There's a worksheet text function called UPPER (and one for LOWER). Simply put =UPPER(cell reference) and it will turn the whole cell into uppercase.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top