automatic capital letter in a cell

C

capital letter

If I write anything in a cell, that should be capital letter automatically.
how can I do it. Suggest me.
 
G

Gary''s Student

Without VBA:

use the CAPSLOCK key


With VBA, enter the following macro in the worksheet event code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Target
Application.EnableEvents = False
If Application.WorksheetFunction.IsText(r) Then
r.Value = UCase(r.Value)
End If
Application.EnableEvents = True
End Sub
 
Top