Uppercase

P

Prashant

Hi All,

Need your help!!!

I need a setting/formula/Coding in such a way that whatever text I type in
sheet 1 it should automatically to be returned in Upper Case i.e. in CAPS.

I checked settings but did not find anything helpful.

Thanks in advance for your assistance!!!

Prashant.
 
B

Brad

The only way that I know can change the information is the same cell you type
it in is using a macro. This macro is relatively easy - this maco is located
in the microsoft Excel object section - on the sheet that you want to change.

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Value = UCase(Target.Value)
End Sub

If you never have written a macro - "Google" is a good resourse - as well as
this site.
 
J

Jacob Skaria

I understand you are try to convert this automatically as you type in to
Sheet1. Select the sheet tab which you want to work with. Right click the
sheet tab and click on 'View Code'. This will launch VBE. Paste the below
code to the right blank portion. Get back to to workbook and try out.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target <> "" Then
If Not Target.HasFormula Then Target = UCase(Target.Value)
End If
End Sub
 
B

Brad

Your suggestion will work but will require two cells one for the OP to enter
the information and another to change it to caps - as I'm sure you are well
aware of.
 
B

Billns

Hi All,

Need your help!!!

I need a setting/formula/Coding in such a way that whatever text I type in
sheet 1 it should automatically to be returned in Upper Case i.e. in CAPS.

I checked settings but did not find anything helpful.

Thanks in advance for your assistance!!!

Prashant.

Why not just hit Caps Lock key before you enter the information?
Then hit it again when you're done.

Bill
 
C

Chip Pearson

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Value = UCase(Target.Value)
End Sub


You should use Application.EnableEvents to prevent looping:


Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End Sub

Without disabling events, changing a cell causes Change to run, which
changes the cell, which causes Change to run, which changes the cell,
which causes Change to run, and on and on until VBA gives up.

EnableEvents = False prevents this looping by indicating to Excel that
it should not trigger any events. EnableEvents = True restores normal
behavior.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 

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

Similar Threads

Convert to uppercase 1
Searching Uppercase characters 1
Auto Uppercase 5
Uppercase 1
Find Upper Case Text 2
Change all text on Spread sheet 1
Clear formula memory? 4
Help?! Format Cells for ALL CAPS 1

Top