Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

supprimer la couleur de fond de certaines cellules

1 réponse
Avatar
e.l.f
Bonjour !

voila j'ai un classeur avec moult cellules ayant des fonds couleurs
differentes.

je souhaite supprimer la couleur de fond de certaines. completement
debutant, je suis arrivé a cela:


Sub Macro()
For Each Cell In Range("A1:IV1000")
If Interior.ColorIndex = 14 Then
Cell.Select
With Selection.Interior.ColorIndex = xlNone
End With
End If
Next
End Sub



Malheureusement cela ne marche pas :-(

pouvez vousme debloquer?

Merci !

T

1 réponse

Avatar
e.l.f
Bonjour !

voila j'ai un classeur avec moult cellules ayant des fonds couleurs
differentes.

je souhaite supprimer la couleur de fond de certaines. completement
debutant, je suis arrivé a cela:


Sub Macro()
For Each Cell In Range("A1:IV1000")
If Interior.ColorIndex = 14 Then
Cell.Select
With Selection.Interior.ColorIndex = xlNone
End With
End If
Next
End Sub



Malheureusement cela ne marche pas :-(

pouvez vousme debloquer?

Merci !

T


c'est bon je viens de trouver !!

Sub virelescouleurs()
For Each cell In ActiveSheet.UsedRange
With cell.Interior
If .ColorIndex = 3 Then
.ColorIndex = xlNone

End If
End With
Next
End Sub

Merci quand meme !