#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lostinformulas
 
Posts: n/a
Default All Capitals


is there a VB code that will change the case to all Capitals regardless
of what is typed in worksheet!!!!


--
lostinformulas
------------------------------------------------------------------------
lostinformulas's Profile: http://www.excelforum.com/member.php...o&userid=35229
View this thread: http://www.excelforum.com/showthread...hreadid=551668

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Michael M
 
Posts: n/a
Default All Capitals

Hi
Try using the UPPER function.

=UPPER(A1) will convert what is in A1 to Upper case

HTH
Michael M

"lostinformulas" wrote:


is there a VB code that will change the case to all Capitals regardless
of what is typed in worksheet!!!!


--
lostinformulas
------------------------------------------------------------------------
lostinformulas's Profile: http://www.excelforum.com/member.php...o&userid=35229
View this thread: http://www.excelforum.com/showthread...hreadid=551668


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bearacade
 
Posts: n/a
Default All Capitals


This is from the Microsoft board.

Becareful you don't have too big of a range.. your workbook will be
busy for a long time ...

Sub Uppercase()

For Each x In Range("A1:A5")
x.Value = UCase(x.Value)
Next

End Sub


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=551668

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lostinformulas
 
Posts: n/a
Default All Capitals


Thanks,,

=Upper didn't work due to other condition in the cell


Bearacada,

Sub Uppercase()

worked perfect is there away for it to run automatically.


--
lostinformulas
------------------------------------------------------------------------
lostinformulas's Profile: http://www.excelforum.com/member.php...o&userid=35229
View this thread: http://www.excelforum.com/showthread...hreadid=551668

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default All Capitals

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

As written, operates on Columns A:H as you enter text in a cell.

Change the 8 to whatever you wish.

This is event code and must go into the sheet module.

Right-click on the sheet tab and "View Code". Copy and paste the above into
that module.


Gord Dibben MS Excel MVP

On Tue, 13 Jun 2006 18:04:41 -0500, lostinformulas
<lostinformulas.29d5ep_1150240213.9958@excelforu m-nospam.com wrote:


Thanks,,

=Upper didn't work due to other condition in the cell


Bearacada,

Sub Uppercase()

worked perfect is there away for it to run automatically.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lostinformulas
 
Posts: n/a
Default All Capitals


Gord Dibben

Thank You for the code it worked great!


--
lostinformulas
------------------------------------------------------------------------
lostinformulas's Profile: http://www.excelforum.com/member.php...o&userid=35229
View this thread: http://www.excelforum.com/showthread...hreadid=551668

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default All Capitals

Thanks for the feedback.

Happy to assist.


Gord

On Wed, 14 Jun 2006 10:14:13 -0500, lostinformulas
wrote:


Gord Dibben

Thank You for the code it worked great!


Gord Dibben MS Excel MVP
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
Sortng Problem with capitals Kal321 New Users to Excel 6 January 30th 06 10:01 PM
Text All Capitals Joey New Users to Excel 3 May 31st 05 11:54 PM
Change Capitals to Sentence Case do Excel Discussion (Misc queries) 2 March 29th 05 02:31 AM


All times are GMT +1. The time now is 03:44 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"