Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
J.E
 
Posts: n/a
Default Capitalizing selected area

Is the correct verb 'to capitalize' ? :D

Anyway, how do I make letters in selected
area go CAPS? Its a workbook that is going
to be filled up in daily basis by novice users
and input should always be in capital letters.

Thank you.

  #2   Report Post  
Harald Staff
 
Posts: n/a
Default

Hi

You need a small macro for that:

Sub Capitalize()
Dim Cel As Range
For Each Cel In Selection
Cel.Formula = UCase$(Cel.Formula)
Next
End Sub

HTH. Best wishes Harald

"J.E" skrev i melding
...
Is the correct verb 'to capitalize' ? :D

Anyway, how do I make letters in selected
area go CAPS? Its a workbook that is going
to be filled up in daily basis by novice users
and input should always be in capital letters.

Thank you.



  #3   Report Post  
Ramakrishnan Rajamani
 
Posts: n/a
Default

Use =UPPER(text)

"J.E" wrote:

Is the correct verb 'to capitalize' ? :D

Anyway, how do I make letters in selected
area go CAPS? Its a workbook that is going
to be filled up in daily basis by novice users
and input should always be in capital letters.

Thank you.


  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

As the text is entered it shall be changed to UPPER.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 2 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Operates on columns A and B

To operate on a range use

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Application.Intersect(Range("A1:A20"), Target) Is Nothing Then
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
End If
ErrHandler:
Application.EnableEvents = True
End Sub

Note: this is sheet event code and must go behind the worksheet.

Right-click on sheet tab and "View Code".

Paste one of the above into that sheet module.


Gord Dibben Excel MVP

On Wed, 30 Mar 2005 19:22:20 +0300, "J.E" wrote:

Is the correct verb 'to capitalize' ? :D

Anyway, how do I make letters in selected
area go CAPS? Its a workbook that is going
to be filled up in daily basis by novice users
and input should always be in capital letters.

Thank you.


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
The selected area grows when I click a cell or press keys to move. yendorexcel Excel Discussion (Misc queries) 2 February 14th 05 06:02 AM
Printing - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM
Area Under Curve Ray Naidu Excel Worksheet Functions 2 January 15th 05 11:11 PM
Changing print area Aaron Excel Discussion (Misc queries) 2 January 9th 05 05:58 PM
Bar Chart Label Sizes [email protected] Charts and Charting in Excel 2 December 27th 04 03:19 PM


All times are GMT +1. The time now is 02:57 PM.

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"