One way is to setup the AutoCorrect feature of Excel. Setup AutoCorrect to
substitute Yes for y and for Y. Same for No. AutoCorrect is accessed with
Tools - AutoCorrect Options.
Another way is to use an event macro to do it. Post back if you want an
event macro. HTH Otto
Thanks for the help, however, I tried the auto correct feature, but found
whenever I typed the letter y the word yes would appear. If the event macro
would prevent this from happening that would be great!
- jhardw
Just a note: if you have "yes" in A1 and "no" in A2, type "y" in A3 and
autocomplete will select "yes".
No need for event code unless you would have several words starting with "y"
in that column.
But if you think you need it, try this event code.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
Select Case LCase(Target.Value)
Case "y"
Target.Value = "yes"
Case "n"
Target.Value = "no"
End Select
End If
ws_exit:
Application.EnableEvents = True
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.