Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Auto change font to 'capital letters'
Hi,
is it possible to change data entered into any cell so that it appears as CAPITAL LETTERS without actualy placing a formula (=UPPER(A2) into each cell. I want this to apply to the whole worksheet. thanks |
#2
|
|||
|
|||
Right-click the worksheet tab, select View Code, and
insert the code below: Private Sub Worksheet_Change(ByVal Target As Excel.Range) Application.EnableEvents = False With Target If .Count = 1 Then .Value = UCase(.Value) End If End With Application.EnableEvents = True End Sub --- Press ALT+Q to close and return to XL. HTH Jason Atlanta, GA -----Original Message----- Hi, is it possible to change data entered into any cell so that it appears as CAPITAL LETTERS without actualy placing a formula (=UPPER (A2) into each cell. I want this to apply to the whole worksheet. thanks . |
#3
|
|||
|
|||
Jason
,thanks for your help , I had to adjust it a little but it works fine, regards Anthony "Jason Morin" wrote: Right-click the worksheet tab, select View Code, and insert the code below: Private Sub Worksheet_Change(ByVal Target As Excel.Range) Application.EnableEvents = False With Target If .Count = 1 Then .Value = UCase(.Value) End If End With Application.EnableEvents = True End Sub --- Press ALT+Q to close and return to XL. HTH Jason Atlanta, GA -----Original Message----- Hi, is it possible to change data entered into any cell so that it appears as CAPITAL LETTERS without actualy placing a formula (=UPPER (A2) into each cell. I want this to apply to the whole worksheet. thanks . |
#4
|
|||
|
|||
Is there any chance you will enter any formulas on this page at all? If so
then you need to catch those and not convert them else you will lose the formulas as soon as you hit ENTER, so with a slight addition to Jason's code Private Sub Worksheet_Change(ByVal Target As Excel.Range) Application.EnableEvents = False With Target If .Count = 1 And .HasFormula = False Then .Value = UCase(.Value) End If End With Application.EnableEvents = True End Sub -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "Anthony" wrote in message ... Jason ,thanks for your help , I had to adjust it a little but it works fine, regards Anthony "Jason Morin" wrote: Right-click the worksheet tab, select View Code, and insert the code below: Private Sub Worksheet_Change(ByVal Target As Excel.Range) Application.EnableEvents = False With Target If .Count = 1 Then .Value = UCase(.Value) End If End With Application.EnableEvents = True End Sub --- Press ALT+Q to close and return to XL. HTH Jason Atlanta, GA -----Original Message----- Hi, is it possible to change data entered into any cell so that it appears as CAPITAL LETTERS without actualy placing a formula (=UPPER (A2) into each cell. I want this to apply to the whole worksheet. thanks . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change font in a forms control combo box | Excel Discussion (Misc queries) | |||
change font when sheet is protected | Excel Discussion (Misc queries) | |||
How do I get the font color to change automatically depending on | Excel Discussion (Misc queries) | |||
How to change the default font and size of "comments"? | Excel Discussion (Misc queries) | |||
Change Font Size | Excel Worksheet Functions |