You may also try to use the following:
- select the cell (e.g. cell C1)
- goto 'Data - Validation' and choose custom
- enter the following formula:
=EXACT(C1,LOWER(C1))
The code you want to use is the Event code from Chip's page.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub
Copy this code then right-click on your worksheet tab and "View Code"
Paste in there.
Change the UCase to LCase and adjust the range A1:A10 to whatever you wish.
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.