LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel cells automatic formatting of text

I use the following data to automatically force cells that have text input
into uppercase or proper case. On the odd occasion I do not want the text
input in the listed cells to change into upper case or proper case, but to
show exactly as I have typed it in. Is there a way that I can add to the
following programming lines that will enable me to do this - e.g. can the
input be preceded with some character that prevents the text from taking on
upper case or proper case?

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Range("A1,A2,A3")) Is Nothing Then
With Target
.Value = UCase(.Value)
End With
ElseIf Not Intersect(Target, Range("B1,B12")) Is Nothing Then
With Target
.Value = Application.Proper(.Value)
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

Thanks in advance of any help.
John
 
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
Stop automatic formatting of cells (number, text, date, etc) Marcela Excel Worksheet Functions 4 June 9th 08 08:09 PM
automatic formatting of cells to currency in Excel 2007 mikky Excel Worksheet Functions 0 November 29th 06 12:16 PM
How can I get automatic row height for merged cells with text wra. ConfusedLady Excel Worksheet Functions 1 April 23rd 05 02:49 AM
mag-text in merged cells-automatic row heigh 68magnolia71 Excel Worksheet Functions 10 April 9th 05 08:43 PM
Combining & formatting cells with text - Excel 2002 Bob Excel Discussion (Misc queries) 4 March 4th 05 10:35 PM


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