couleur cellule

M

mic

Guest
Bonjour à tous

voila mon problème, j'aimerais pouvoir tester la couleur de la cellule
(ex. SI(A1=jaune) alors 1 sinon 0) c'est possible sans VBA ?????
merci de votre aide
@+
 
A

A_Binouze_Drinker_Among_Others

Guest
bonjour

regarde cette conversation <http://www.excel-downloads.com/html/French/forum/read.php?f=1&i=5343&t=5343>

voilà le code du fichier joint à cette ficelle

Function BgColorcountif(SearchArea As Object, BgColor As Integer) As Integer
For Each cell In SearchArea
BgColorcountif = BgColorcountif + Abs(cell.Interior.ColorIndex = BgColor)
Next cell
End Function

Function BgColorSumif(SearchArea As Object, BgColor As Integer) As Integer
For Each cell In SearchArea
BgColorSumif = BgColorSumif + IIf(cell.Interior.ColorIndex = BgColor, cell, 0)
Next cell
End Function
Function BgColor(CkCell As Object)
BgColor = Abs(CkCell.Interior.ColorIndex)
End Function


bye
stephane
 

Statistiques des forums

Discussions
314 019
Messages
2 104 649
Membres
109 092
dernier inscrit
ahm74