Option Explicit
Option Compare Text
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub 'work only on single cell selections
If Intersect(Target, Range("D10:BB70")) Is Nothing And _
Intersect(Target, Range("D71:BB256")) Is Nothing Then Exit Sub 'work only on range D10:BB256
If Target.Value = "S" Or Target.Value = "W" Then OldVal = Target.Value Else OldVal = ""
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub 'work only on single cell changes
If IsNumeric(Target.Value) Then Exit Sub 'work only on entry of alpha characters
If Intersect(Target, Range("D10:BB70")) Is Nothing And _
Intersect(Target, Range("D75:BB256")) Is Nothing Then Exit Sub
If Len(OldVal) = 0 Then Exit Sub
Dim ThisCol As Integer, Col As Integer, ThisRow As Long
ThisCol = Target.Column
ThisRow = Target.Row
If ThisCol < 54 Then
For Col = ThisCol To 54
Select Case Target.Value
Case "S"
If Cells(ThisRow, Col).Value = "W" Then _
Cells(ThisRow, Col).Value = Target.Value
Case "W"
If Cells(ThisRow, Col).Value = "S" Then _
Cells(ThisRow, Col).Value = Target.Value
End Select
Next Col
End If
End Sub