A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Capitalizing selected area



 
 
Thread Tools Display Modes
  #1  
Old March 30th, 2005, 05:22 PM
J.E
external usenet poster
 
Posts: n/a
Default Capitalizing selected area

Is the correct verb 'to capitalize' ?

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  
Old March 30th, 2005, 05:36 PM
Harald Staff
external usenet poster
 
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
news
Is the correct verb 'to capitalize' ?

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  
Old March 30th, 2005, 05:37 PM
Ramakrishnan Rajamani
external usenet poster
 
Posts: n/a
Default

Use =UPPER(text)

"J.E" wrote:

Is the correct verb 'to capitalize' ?

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  
Old March 30th, 2005, 10:10 PM
Gord Dibben
external usenet poster
 
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' ?

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.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing Outlook not complete automatically area code. Junior from Brazil Contacts 2 March 29th, 2005 06:17 PM
Printing - Have to set print area 1 column further than necessary [email protected] General Discussion 2 January 24th, 2005 07:59 PM
Selected font changes is being applied to complete document Bill Dorion New Users 2 August 10th, 2004 06:07 PM
Group Option Not selected but show up in Query SMac Running & Setting Up Queries 2 June 4th, 2004 05:16 PM


All times are GMT +1. The time now is 06:28 AM.


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