![]() |
|
|
|
#1
|
|||
|
|||
|
How do I force data entered into colunms BCD and m to be uppercase. I have seen sub format for one column but not for the four I need.
|
|
#2
|
|||
|
|||
|
this will work but I'm sure some one can shorten it for you
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
ElseIf Not Intersect(Target, Range("B:B")) Is Nothing Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
ElseIf Not Intersect(Target, Range("C:C")) Is Nothing Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
ElseIf Not Intersect(Target, Range("D:D")) Is Nothing Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
ElseIf Not Intersect(Target, Range("M:M")) Is Nothing Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End If
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 'Linking' entered information to other "cells" from an original "cell" in MS Word | Wade | Word | 6 | 09-03-2012 05:22 PM |
Can I force a master slide to have text input limitations?
|
Irene | PowerPoint | 3 | 09-21-2011 10:02 AM |
| VBA Code to auto resize cells when text entered | OTPM | Excel Programming | 0 | 09-18-2011 04:21 AM |
Day and Month to Uppercase
|
Andy2011 | Word VBA | 1 | 07-22-2011 04:34 PM |
| Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |