Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell tests for upper case, and certain #'s
Don't bother testing whether it is capital, just upshift regardless.
Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then With Target .Value = UCase(.Value) End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH RP (remove nothere from the email address if mailing direct) "Beth" wrote in message ... How can you test a cell to determine whether the letter entered (since it will only be a letter) is capital, and if it isn't then have it automatically capitalized? Next how can you test to see if the value entered is in a range of 5 options? Thanks for your anticipated help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell tests for upper case, and certain #'s
thanks it works great!!!!!!!
"Bob Phillips" wrote: Don't bother testing whether it is capital, just upshift regardless. Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then With Target .Value = UCase(.Value) End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH RP (remove nothere from the email address if mailing direct) "Beth" wrote in message ... How can you test a cell to determine whether the letter entered (since it will only be a letter) is capital, and if it isn't then have it automatically capitalized? Next how can you test to see if the value entered is in a range of 5 options? Thanks for your anticipated help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
convert lower to upper case automatically without using UPPER | Excel Discussion (Misc queries) | |||
Changing multiple cell text from lower case to upper case | Excel Discussion (Misc queries) | |||
Changing upper case characters to upper/lower | Excel Discussion (Misc queries) | |||
Changing file in all upper case to upper and lower case | Excel Discussion (Misc queries) | |||
How do I convert all upper case excel sheet into upper and lower . | Excel Discussion (Misc queries) |