Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

How to set Auto-Change letters into Uppercases for Data entry in E

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cpviv - 07 May 2008 09:02 GMT
Hi,

I need help here.

Here is the scenario.
When I type alphabets in lower cases at each cell, I need the cell to
auto-change the alphabets to upper cases. I do not want to use the Caps Lock
button from the keyboard.

Help...
Signature

Thank you,
Cpviv

Mike H - 07 May 2008 09:17 GMT
Hi,

Right click your sheet tab, view code and paste this in. It works on the
entire sheet so if you want it limited to a certain range then post back

Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
       If Not IsNumeric(Target) Then
               Application.EnableEvents = False
               Target = UCase(Target)
               Application.EnableEvents = True
       End If
End Sub

Mike

> Hi,
>
[quoted text clipped - 6 lines]
>
> Help...
Cpviv - 07 May 2008 09:32 GMT
Hi Mike,

It works!

Ok, you are right. I have many columns fill with data. How to set one column
with Uppercases, one column with Propercases, one column with the first
letter starts with Capital letter, and the rest of columns leave as they are.

Cpviv

> Hi,
>
[quoted text clipped - 22 lines]
> >
> > Help...
Mike H - 07 May 2008 09:45 GMT
Hi,

This is set up to work on columns 1,2 & 3 for Upper Proper and Lower cases

Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
       If Not IsNumeric(Target) Then
           Application.EnableEvents = False
               If Target.Column = 1 Then 'Column A
                   Target = StrConv(Target, vbUpperCase)
               ElseIf Target.Column = 2 Then
                   Target = StrConv(Target, vbProperCase)
                  ElseIf Target.Column = 3 Then
                   Target = StrConv(Target, vbLowerCase)
               End If
               Application.EnableEvents = True
       End If
End Sub

Mike

> Hi Mike,
>
[quoted text clipped - 32 lines]
> > >
> > > Help...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.