Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a simple workbook that I would like to limit the input in columns F,G, and H begining on row 3 of each to only a capitol N or Y. I would like to use code so it automatically changes to upper case. Is this possible? -- TJDeborah ------------------------------------------------------------------------ TJDeborah's Profile: http://www.excelforum.com/member.php...o&userid=33186 View this thread: http://www.excelforum.com/showthread...hreadid=530041 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may be able to avoid code by using data validation
IN the cell you want to control inputs select Data / valaidation Then choose "list" from the first drop down Then enter Y,N in the 'Source' Box This will force only two entries "TJDeborah" wrote: I have a simple workbook that I would like to limit the input in columns F,G, and H begining on row 3 of each to only a capitol N or Y. I would like to use code so it automatically changes to upper case. Is this possible? -- TJDeborah ------------------------------------------------------------------------ TJDeborah's Profile: http://www.excelforum.com/member.php...o&userid=33186 View this thread: http://www.excelforum.com/showthread...hreadid=530041 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi TJDeborah
Try this in the worksheet's code: Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False With Target If .Column < 6 Then Exit Sub If .Column 8 Then Exit Sub If .Row < 3 Then Exit Sub If .Value = "y" Or .Value = "n" Then .Value = UCase(.Value) Else MsgBox "Only ""Y"" or ""N"" please." .Select .ClearContents End If End With Application.EnableEvents = True End Sub Regards Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In Excel, changing a range of cells to all caps. | Excel Worksheet Functions | |||
Changing all caps to proper | Excel Discussion (Misc queries) | |||
Formula for changing all caps to lower case | Excel Discussion (Misc queries) | |||
How to automatically change a single letter text entry to caps?? | New Users to Excel | |||
Changing text from all caps to first letter cap | Excel Discussion (Misc queries) |