Hello VBA genius types. I need some help. I found the code below to do almost exactly what i want. However, i would like to know if it can be modified to only affect a specific cell range. In my case, the cell range is B9:AF37. Thanks in advance for any suggestions. (I am a complete novice with VBA )
Code
Option Compare Text 'A=a, B=b, ... Z=z
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
Dim Rng1 As Range
On Error Resume Next
Set Rng1 = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, 1)
On Error GoTo 0
If Rng1 Is Nothing Then
Set Rng1 = Range(Target.Address)
Else
Set Rng1 = Union(Range(Target.Address), Rng1)
End If
For Each Cell In Rng1
Select Case Cell.Value
Case vbNullString
Cell.Interior.ColorIndex = xlNone
Cell.Font.Bold = False
Case "L"
Cell.Interior.ColorIndex = 5
Case "W"
Cell.Interior.ColorIndex = 48
Case "E"
Cell.Interior.ColorIndex = 8
Case "O"
Cell.Interior.ColorIndex = 3
Case "M"
Cell.Interior.ColorIndex = 2
Case "S"
Cell.Interior.ColorIndex = 4
Case "A"
Cell.Interior.ColorIndex = 38
Case "T"
Cell.Interior.ColorIndex = 27
Case Else
Cell.Interior.ColorIndex = xlNone
Cell.Font.Bold = False
End Select
Next
End Sub
Private Sub Workbook_Open()
End Sub
Display More