Private Sub Worksheet_Activate()
For Each c In ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, 23)
a = Split(Mid(c.Formula, 2), "!")
Sheets(a(0)).Range(a(1)).Copy
c.PasteSpecial Paste:=xlPasteFormats
Next c
End Sub
Private Sub Worksheet_Activate()
For Each c In ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, 23)
a = Split(Mid(c.Formula, 2), "!")
c.Font.ColorIndex = Sheets(a(0)).Range(a(1)).Font.ColorIndex
Next c
End Sub
Private Sub Worksheet_Activate()
Set champ = Range("B7:U8")
For Each c In champ.SpecialCells(xlCellTypeFormulas, 23)
a = Split(Mid(c.Formula, 2), "!")
c.Font.ColorIndex = Sheets(a(0)).Range(a(1)).Font.ColorIndex
Next c
End Sub
Function compteCouleurTexte(champ, couleur)
Application.Volatile
n = 0
For Each c In champ
If c.Font.ColorIndex = couleur Then n = n + 1
Next c
compteCouleurTexte = n
End Function