Capitalization

  • Thread starter Thread starter April
  • Start date Start date
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?
 
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
 
Back
Top