automatic capital letter in a cell

G

Guest

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

Guest

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
 

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