PC Review


Reply
Thread Tools Rate Thread

Capital letters in cells

 
 
hk@rygestopkonsulenterne.dk
Guest
Posts: n/a
 
      28th Nov 2007
HI

Is it possible to program a cell in Excel to convert lowercase letters
to capital letters? Ex.: I type 'e' in a cell and upon pressing enter
it changes to 'E'. If I type 'E' in the cell nothing should happen. If
I type 'Ee' it should change to 'EE'.

Thanks in advance

Henrik
 
Reply With Quote
 
 
 
 
Zone
Guest
Posts: n/a
 
      28th Nov 2007
If you only want this to happen for one particular cell (say A1), this
should work. Right-click on the sheet's tab, select View Code, and paste
this code in there. Change $A$1 to the address of the cell you want. James

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
Application.EnableEvents = True
End If
End Sub


<(E-Mail Removed)> wrote in message
news:02560310-7f72-49ac-a4bc-(E-Mail Removed)...
> HI
>
> Is it possible to program a cell in Excel to convert lowercase letters
> to capital letters? Ex.: I type 'e' in a cell and upon pressing enter
> it changes to 'E'. If I type 'E' in the cell nothing should happen. If
> I type 'Ee' it should change to 'EE'.
>
> Thanks in advance
>
> Henrik



 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      28th Nov 2007
You could,

Right click the sheet tab, view code and paste this in. Change the range to
suit your needs:-

Private Sub Worksheet_Change(ByVal Target As Range)
Const sheet_Range As String = "A1:A100" '<== change to suit
On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(sheet_Range)) Is Nothing Then
Target.Value = UCase(Target.Value)
End If
ws_exit:
Application.EnableEvents = True
End Sub

Mike

"(E-Mail Removed)" wrote:

> HI
>
> Is it possible to program a cell in Excel to convert lowercase letters
> to capital letters? Ex.: I type 'e' in a cell and upon pressing enter
> it changes to 'E'. If I type 'E' in the cell nothing should happen. If
> I type 'Ee' it should change to 'EE'.
>
> Thanks in advance
>
> Henrik
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change from capital letters to small letters and vice versa Tobias Microsoft Word Document Management 1 3rd Dec 2007 12:39 PM
How do I change a column of cells to all capital letters? =?Utf-8?B?bW9ycGF0dHlqbw==?= Microsoft Excel Worksheet Functions 4 13th Mar 2005 07:59 PM
Word Macro: How to convert capital letters to lower case letters Leonardo Da Vinci Microsoft Word Document Management 4 8th Jun 2004 02:05 PM
Format Cells to Capital Letters =?Utf-8?B?Sm9obg==?= Microsoft Excel Misc 1 1st May 2004 08:12 PM
Capital Letters in Cells Julia Microsoft Excel Misc 4 22nd Oct 2003 02:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:47 PM.