Aplicar formato a parte de una fila, dependiendo del valor de una celda
Necesito modificar el siguiente código para que, en vez de aplicar el formato a toda la fila, lo haga únicamente de la columna "A" a la "F".
El código que tendo es el siguiente.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.ScreenUpdating = False
If Not Intersect(Target, Range("E:E")) Is Nothing Then
If (Target.Value = "Anulada") Then
With Target
.EntireRow.Interior.ColorIndex = 6
.EntireRow.Font.ColorIndex = 1
.EntireRow.Font.Bold = False
End With
End If
If (Target.Value = "En tramitación") Then
With Target
.EntireRow.Interior.ColorIndex = 0
.EntireRow.Font.ColorIndex = 1
End With
End If
If (Target.Value = "No aceptada") Then
With Target
.EntireRow.Interior.ColorIndex = 6
.EntireRow.Font.ColorIndex = 1
.EntireRow.Font.Bold = False
End With
End If
If (Target.Value = "Realizada") Then
With Target
.EntireRow.Interior.ColorIndex = 10
.EntireRow.Font.ColorIndex = 2
.EntireRow.Font.Bold = True
End With
End If
If (Target.Value = "Traspasada a RRII") Then
With Target
.EntireRow.Interior.ColorIndex = 11
.EntireRow.Font.ColorIndex = 2
.EntireRow.Font.Bold = True
End With
End If
End If
Application.ScreenUpdating = True
End Sub
2 Respuestas
Respuesta de fejoal
1
Respuesta de Dante Amor
1