Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a macro that will capitalize text entered into a cell? Most
of the time the text will be in a range such as A1:C3. Thanks for your help. Michael |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My response assumes that you want to make all the letters of a cell within
the specified range upper case immediately after hitting the Enter key for the entry in that cell. First off, you have to decide on the range of cells to apply this functionality to (it can't be "most of the time"... it has to be all of the time). I'll assume for this response that the range of cells is A1:C3 as you mentioned. Right click the tab at the bottom of the worksheet that is to have this functionality, select View Code from the popup menu that appears and then copy/paste the following into the code window that you were taken to... Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1:C3")) Is Nothing Then Application.EnableEvents = False Target.Value = UCase(Target.Value) Application.EnableEvents = True End If End Sub Now, go back to the work sheet and type something into any cell in the range A1:C3... as soon as you hit the Enter key, the text you typed in will become capitalized. -- Rick (MVP - Excel) "Michael Lanier" wrote in message ... Is there a macro that will capitalize text entered into a cell? Most of the time the text will be in a range such as A1:C3. Thanks for your help. Michael |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your solution works great. Thanks.
Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Capitalize text when input in cell | Excel Discussion (Misc queries) | |||
In a column, how can I capitalize ALL text? | Excel Discussion (Misc queries) | |||
Capitalize the last character of a cell. | Excel Programming | |||
Capitalize Text if 2 lists are equal | New Users to Excel | |||
Capitalize text | Excel Discussion (Misc queries) |