Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
JB
Bonjour,
Dans un module alt+F11 puis Insertion/Module
Function SommeCouleurFondTexte(champ As Range, couleurFond, couleurTexte) Application.Volatile Dim c, temp temp = 0 For Each c In champ If c.Interior.ColorIndex = couleurFond And c.Font.ColorIndex = couleurTexte Then If IsNumeric(c.Value) Then temp = temp + c.Value End If Next c SommeCouleurFondTexte = temp End Function
Pour Maj immédiate (sinon F9)
Dim celluleAvant Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not IsEmpty(celluleAvant) Then If Not Intersect(Range(celluleAvant), [B:B]) Is Nothing Then Calculate End If celluleAvant = Target.Address End Sub
http://cjoint.com/?jtnJoGnu00
JB http://boisgontierjacques.free.fr
On 19 sep, 12:54, Guy <Andr?> wrote:
Bonjour à tous,
J'ai des fonds de cellules de couleur différentes (Bleu Noir etc.)
Ces cellules peuvent également avoir des couleur de Police différentes
Comment faire une fonction Somme en ventilant
Exemple si dans la plage A1:G1 j'ai des cellules noires avec la Police Bl anche
Comment écrire la condition SI
-- Amicalement et merci
Bonjour,
Dans un module alt+F11 puis Insertion/Module
Function SommeCouleurFondTexte(champ As Range, couleurFond,
couleurTexte)
Application.Volatile
Dim c, temp
temp = 0
For Each c In champ
If c.Interior.ColorIndex = couleurFond And c.Font.ColorIndex =
couleurTexte Then
If IsNumeric(c.Value) Then temp = temp + c.Value
End If
Next c
SommeCouleurFondTexte = temp
End Function
Pour Maj immédiate (sinon F9)
Dim celluleAvant
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not IsEmpty(celluleAvant) Then
If Not Intersect(Range(celluleAvant), [B:B]) Is Nothing Then
Calculate
End If
celluleAvant = Target.Address
End Sub
http://cjoint.com/?jtnJoGnu00
JB
http://boisgontierjacques.free.fr
On 19 sep, 12:54, Guy <Andr?> wrote:
Bonjour à tous,
J'ai des fonds de cellules de couleur différentes (Bleu Noir etc.)
Ces cellules peuvent également avoir des couleur de Police différentes
Comment faire une fonction Somme en ventilant
Exemple si dans la plage A1:G1 j'ai des cellules noires avec la Police Bl anche
Function SommeCouleurFondTexte(champ As Range, couleurFond, couleurTexte) Application.Volatile Dim c, temp temp = 0 For Each c In champ If c.Interior.ColorIndex = couleurFond And c.Font.ColorIndex = couleurTexte Then If IsNumeric(c.Value) Then temp = temp + c.Value End If Next c SommeCouleurFondTexte = temp End Function
Pour Maj immédiate (sinon F9)
Dim celluleAvant Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not IsEmpty(celluleAvant) Then If Not Intersect(Range(celluleAvant), [B:B]) Is Nothing Then Calculate End If celluleAvant = Target.Address End Sub
http://cjoint.com/?jtnJoGnu00
JB http://boisgontierjacques.free.fr
On 19 sep, 12:54, Guy <Andr?> wrote:
Bonjour à tous,
J'ai des fonds de cellules de couleur différentes (Bleu Noir etc.)
Ces cellules peuvent également avoir des couleur de Police différentes
Comment faire une fonction Somme en ventilant
Exemple si dans la plage A1:G1 j'ai des cellules noires avec la Police Bl anche