Format a cell to display as all caps

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to format a cell so that text entered will always display in
caps?
 
Hi
Not Directly !......but you can use the UPPER function.
If your data is in A1, put =UPPER(A1) in A2.
This will convet whatever you type in A1 to Uppercase in A2

HTH
Michael
 
No.

You cannot format a cell to display caps.

You can use event code in the worksheet to change the text to caps when you
enter it.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column > 8 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

As written, operates on Columns A through H only. (> 8 limits)

Right-click on the sheet tab and copy/paste the code into the sheet module.


Gord Dibben Excel MVP
 

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

Back
Top