Io nel frattempo provo a vedere se con questa macro CoNa risolve
Premetto che ho considerato che fosse lo sfondo colorato di rosso
- Codice: Seleziona tutto
Sub Formattacella()
Dim Col As Integer
For Each cella In Range("B1:B50")
If cella.Interior.ColorIndex = 3 Then
Col = Col + 1
End If
Next
Range("A1").Select
If Col > 0 Then
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
Else
Selection.Interior.ColorIndex = xlNone
End If
End Sub
Nel caso fossero i font di colore rosso allora usa questa macro
- Codice: Seleziona tutto
Sub FormattaFont()
Dim ColF As Integer
For Each cella In Range("B1:B50")
If cella.Font.ColorIndex = 3 Then
ColF = ColF + 1
End If
Next
Range("A1").Select
If ColF > 0 Then
Selection.Font.ColorIndex = 3
Else
Selection.Font.ColorIndex = 0
End If
End Sub
Fai sapere
Ciao