Is there a way to type the word "yes" in to a cell and have it change
to "YES" uppercase? Without the quotes of course.
Thanks
You are very specific in your request. I'm not sure if that is exactly what
you want, but the following will change any lower case or mixed case "yes" that
you type into a cell into an uppercase "YES".
Right click on your worksheet tab and select "View Code"
Paste the code below into the window that opens:
===========================================
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Application.EnableEvents = False
For Each c In Target
If InStr(1, c.Formula, "yes", vbTextCompare) > 0 Then
c.Value = Replace(c.Formula, "yes", "YES", 1, -1, vbTextCompare)
End If
Next c
Application.EnableEvents = True
End Sub
============================================
You might want to consider modifying this to include other words; or to be
restricted to just certain cells; or to be restricted to when "yes" is the only
thing typed into the cell; etc.
--ron