Re : Problème Code VBA et formules
Je retente en piquant le code de Si.... (j'espère qu'il ne m'en voudra pas)
il manque surement quelque chose mais tu pourras peut être faire la suite
Sub Autre() ' code de Si...
'
https://www.excel-downloads.com/threads/probleme-code-vba-et-formules.233930/
'
Dim P As Range
Set P = Range("AE2:AE78") ' & Cells(Rows.Count, 6).End(xlUp).Row)
P.Interior.ColorIndex = 26
On Error Resume Next
P.SpecialCells(xlCellTypeFormulas) = ""
P.SpecialCells(4).FormulaR1C1 = _
"=IF(AND(RC8=""agence"",OR(RC6=""Inter"",RC6=""t/s"",RC6=""liens"",RC6=""cdr"")),""wwww"","""")"
Set P = Range("AF2:AF78")
P.Interior.ColorIndex = 27
On Error Resume Next
P.SpecialCells(xlCellTypeFormulas) = ""
P.SpecialCells(4).FormulaR1C1 = _
"=IF(AND(RC8=""agence"",OR(RC6=""Inter"",RC6=""t/s"",RC6=""liens"")),""wwww"","""")"
Set P = Range("AG2:AG78")
P.Interior.ColorIndex = 28
On Error Resume Next
P.SpecialCells(xlCellTypeFormulas) = ""
P.SpecialCells(4).FormulaR1C1 = _
"=IF(AND(RC8=""agence"",OR(RC6=""Inter"",RC6=""t/s"",RC6=""brun"",RC6=""cdr"")),""wwww"","""")"
End Sub