Home |
Search |
Today's Posts |
#1
|
|||
|
|||
This code will do it, you need to name the columns as a named range that you
want it to apply to, in the this code the ranges are named 'Input' but obviously you can use any name. If you are unfamiliar with naming ranges or using code post back and I (or someone else!) will give advice, Regards, Alan. Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Not Application.Intersect(Target, Range("Input")) Is Nothing Then Target(1).Value = UCase(Target(1).Value) End If End Sub "thomas donino" wrote in message ... I want to set up certain columns in my spreasheet so that all text entered into it shows in caps |
#2
|
|||
|
|||
how can i make a cell always show text in caps
I want to set up certain columns in my spreasheet so that all text entered
into it shows in caps |
#3
|
|||
|
|||
If you have a formula, use the UPPER() function. Assuming your cell is
user-entered, you'd need an event macro. For example. put this in your worksheet code module (right-click on the worksheet tab and choose View Code): Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Range("A1") If Not Intersect(Target, .Cells) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End With End Sub In article , "thomas donino" wrote: I want to set up certain columns in my spreasheet so that all text entered into it shows in caps |
#4
|
|||
|
|||
Two quibbles -
This code assumes that there's only one cell selected. If Range("Input") was defined as cell J1, and cells A1:J10 were selected, cell A1 would be coerced to upper case, not J1. Also, without disabling events, assigning the value will create a recursive call to Worksheet_Change, which will terminate when XL runs out of stack space. Fortunately, XL terminates nicely, in that case, but it's not good practice. In article , "Alan" wrote: This code will do it, you need to name the columns as a named range that you want it to apply to, in the this code the ranges are named 'Input' but obviously you can use any name. If you are unfamiliar with naming ranges or using code post back and I (or someone else!) will give advice, Regards, Alan. Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Not Application.Intersect(Target, Range("Input")) Is Nothing Then Target(1).Value = UCase(Target(1).Value) End If End Sub "thomas donino" wrote in message ... I want to set up certain columns in my spreasheet so that all text entered into it shows in caps |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wrap text limits in Excel 2003 cell formatting | Excel Discussion (Misc queries) | |||
On click, copy text into another cell - XL2K | Excel Worksheet Functions | |||
How to make a cell recognize multiple text strings? | Excel Worksheet Functions | |||
make a cell empty based on condition | Charts and Charting in Excel | |||
Macro or Function to make text size to suite text Length? | Excel Discussion (Misc queries) |