View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_873_] Simon Lloyd[_873_] is offline
external usenet poster
 
Posts: 1
Default Can I enter a "Y" and return "Yes" in the same cell? PART 2


Hi paste this in to the worksheet module, change the range to suit.

HTH

Regards,
Simon

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim mycell
Dim rng As Range
Set rng = Range("A1:C20")
For Each mycell In rng
If LCase(mycell.Text) = "y" Then
mycell.Value = "Yes"
ElseIf LCase(mycell.Text) < "y" Then Exit Sub
End If
Next mycell
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=571661