Re: R variable
Zut juste connection coupée au moment où j'appuie sur "Envoyer" => Message foutu !
Je disais donc.... Je regardais ton fichier Monique... Moi je n'avais pas de critère "S" ou "M" dans le "classetr1.xls" du début de ce fil...
Mais qu'à celà ne tienne suffit de changer la macro par celle ci :
Private Sub CommandButton1_Click()
Dim Cell As Range
Dim Maplage As Range
Dim i As Integer
Dim R As Integer
Set Maplage = Sheets(1).Range("a3:a" & DerLigne)
On Error GoTo Sortie
R = ComboBox1.Value
For Each Cell In Maplage
If Cell = ListBox1 Then
i = Cell.Row
Cells(i, 11).Formula = "=SUM(COUNTIF(B" & i & ":J" & i & ",""DS"")*12," _
& "COUNTIF(B" & i & ":J" & i & ",""DR"")*12," _
& "COUNTIF(B" & i & ":J" & i & ",""V"")*12," _
& "COUNTIF(B" & i & ":J" & i & ",""S"")*8," _
& "COUNTIF(B" & i & ":J" & i & ",""M"")*10," _
& "COUNTIF(B" & i & ":J" & i & ",""R"")*" & R & ")"
End If
Next
Exit Sub
Sortie:
MsgBox "Entrez un Valeur Numérique Entiere", _
vbCritical, "Thierry's Mini Démo"
End Sub
Bon allez bo rèv !!
ou bonjour à ceux/celles qui liront ce fil au réveil
@+Thierry
|