Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Alan
 
Posts: n/a
Default

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   Report Post  
thomas donino
 
Posts: n/a
Default 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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrap text limits in Excel 2003 cell formatting Adelrose Excel Discussion (Misc queries) 1 April 19th 05 06:32 PM
On click, copy text into another cell - XL2K Bob the Builder Excel Worksheet Functions 2 March 16th 05 10:03 PM
How to make a cell recognize multiple text strings? Tourcat Excel Worksheet Functions 1 February 8th 05 08:29 PM
make a cell empty based on condition mpierre Charts and Charting in Excel 2 December 29th 04 01:01 PM
Macro or Function to make text size to suite text Length? lbbss Excel Discussion (Misc queries) 4 December 14th 04 07:53 PM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"