dragonfire33
Board Regular
- Joined
- Oct 7, 2021
- Messages
- 90
- Office Version
- 365
- Platform
- Windows
What line should I add to extend the range to "g16: m25" please any help would be very useful
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim uF&, i&, nBusca%, Celda As Range
If Not Intersect(Target, Columns(4)) Is Nothing Then
Range("G3:G12,I3:I12,K3:K12,M3:M12").Interior.Color = vbWhite
For i = 0 To 3
nBusca = Target.Offset(0, i - 3)
Select Case i
Case 0
Set Celda = Range("G3:G12").Find(nBusca, , , xlWhole)
Case 1
Set Celda = Range("I3:I12").Find(nBusca, , , xlWhole)
Case 2
Set Celda = Range("K3:K12").Find(nBusca, , , xlWhole)
Case 3
Set Celda = Range("M3:M12").Find(nBusca, , , xlWhole)
End Select
If Not Celda Is Nothing Then
Celda.Interior.Color = vbRed
End If
Next i
Range("G2").Activate
End If
End Sub