Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Change Text to Uppercase Excel 2003

Hello,

Could someone please advise on how I can change text to uppercase in
column B of my worksheet using Excel 2003 - I do not wish to add any
more columns, so I guess a VBA macro might be required? I usually enter
mixed-case text into a cell in column B, so I wish to have this mix-case
text automatically change to uppercase please.

Thanks,

Chris.



*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Change Text to Uppercase Excel 2003

Just on top of my head (not tested):


Dim TCell As Range

For Each TCell In Range("B:B")
TCell.Value = UCase(TCell.Value)
Next


Give it a try :-)



Chris Hankin wrote:
Hello,

Could someone please advise on how I can change text to uppercase in
column B of my worksheet using Excel 2003 - I do not wish to add any
more columns, so I guess a VBA macro might be required? I usually
enter mixed-case text into a cell in column B, so I wish to have this
mix-case text automatically change to uppercase please.

Thanks,

Chris.



*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Change Text to Uppercase Excel 2003


Thanks Charlotte E. for your reply - I tried it out and it work fine -
so thanks again - really appreciated.


*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Change Text to Uppercase Excel 2003

If you want it automatic, you can tie into a worksheet_change event. This runs
each time you make a change to the worksheet.

If you want to try, rightclick on the worksheet tab that should have this
behavior. Select view code and paste this into the newly opened code window:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then
Exit Sub 'only one cell at a time
End If

If Intersect(Target, Me.Range("b:b")) Is Nothing Then
Exit Sub 'only check column B
End If

If Target.HasFormula Then
Exit Sub 'don't touch formulas
End If

On Error GoTo ErrHandler:
Application.EnableEvents = False
Target.Value = UCase(Target.Value)

ErrHandler:
Application.EnableEvents = True

End Sub

If you like Edit|Undo, you may not like this. Most macros that do anything kill
the undo/redo stack.

Chris Hankin wrote:

Hello,

Could someone please advise on how I can change text to uppercase in
column B of my worksheet using Excel 2003 - I do not wish to add any
more columns, so I guess a VBA macro might be required? I usually enter
mixed-case text into a cell in column B, so I wish to have this mix-case
text automatically change to uppercase please.

Thanks,

Chris.

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Change Text to Uppercase Excel 2003

Hi Dave, thankyou so much for your help - really appreciated. Your code
works fine. Thanks again :-)



*** Sent via Developersdex http://www.developersdex.com ***


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
HOW TO CHANGE EXISTING XL DATA SHEET TO ALL UPPERCASE TEXT John Excel Discussion (Misc queries) 5 May 30th 07 05:59 AM
using EVALUATE to change text to uppercase Myles[_2_] Excel Programming 5 November 30th 05 04:55 PM
Automatically change text to uppercase Santie Excel Worksheet Functions 1 February 22nd 05 05:20 PM
How to change text in multiple cells from Uppercase to proper cas. Excel help Excel Worksheet Functions 1 November 17th 04 03:45 AM
Change all text in a column to uppercase Ken Loomis Excel Programming 7 October 6th 04 05:14 AM


All times are GMT +1. The time now is 11:45 PM.

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

About Us

"It's about Microsoft Excel"