![]() |
Changing entry to Caps
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 |
Changing entry to Caps
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 |
Changing entry to Caps
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 |
All times are GMT +1. The time now is 08:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com