Capitalization

A

April

I've imported some data from Access into Excel. In
Access, the data was in all caps (user can enter data in
lowercase but I have Access set-up to conver to caps) but
in Excel, it shows in all lower case. Is there a way to
convert a large data set from lower case to caps?
 
P

Peo Sjoblom

Open the workbook, press Alt + F11, click insert>modules and paste in the
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 + Q to close the VBA editor,
select the data and press Alt + F8 to run the macro named UpCase
 

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