Macro for Upper Case

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Try this: right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End Sub
 
Upvote 0
Hi

Do you mean when a user inputs an entry then the macro will automaticlly convert their input to upper case? If so then perhaps the following in the worksheet module of your the worksheet you want this to apply to:

Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell as Range, rng As Range
Set rng = Intersect(Range("A:A"),Target)
If Not rng Is Nothing Then
  Application.EnableEvents = False
  For Each cell In rng
    cell.Value = UCase(cell.Value)
  Next cell
  Application.EnableEvents = True
End If
End Sub

Change the address in red to whichever column/range you want this to apply to.
 
Upvote 0

Forum statistics

Threads
1,196,073
Messages
6,013,265
Members
441,758
Latest member
Abren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top