1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| Sub charger_dates()
'MsgBox "Poursuite du traitement"
Dim ligne As Integer: Dim la_mol As String: Dim lconc As String
Dim chaine_conc As String: Dim ligne_donnees As Integer
Dim colonne As Integer: Dim plage As Range
chaine_conc = ""
la_mol = Sheets("listes").liste_mol.Value
lconc = Sheets("listes").liste_conc.Value
ligne_donnees = 5
While Sheets("donnees").Cells(ligne_donnees, 6).Value <> ""
Sheets("donnees").Cells(ligne_donnees, 6).Value = ""
ligne_donnees = ligne_donnees + 1
Wend
Sheets("analyses").Select
ligne = 2: ligne_donnees = 5
While Cells(ligne, 2).Value <> ""
If (Cells(ligne, 10).Value = la_mol And Cells(ligne, 13).Value = lconc) Then
If (InStr(1, chaine_conc, Cells(ligne, 4).Value, 1) = 0) Then
chaine_conc = chaine_conc & "-" & Cells(ligne, 13).Value
Sheets("donnees").Cells(ligne_donnees, 6).Value = Cells(ligne, 4).Value
ligne_donnees = ligne_donnees + 1
End If
End If
ligne = ligne + 1
Wend
ligne_donnees = ligne_donnees - 1
Sheets("donnees").Select
Set plage = Range(Cells(5, 6), Cells(ligne_donnees, 6))
plage.Select
ligne_donnees = 4
Sheets("listes").liste_dates.Clear
While Sheets("donnees").Cells(ligne_donnees, 6).Value <> ""
Sheets("listes").liste_dates.AddItem Sheets("donnees").Cells(ligne_donnees, 6).Value
ligne_donnees = ligne_donnees + 1
Wend
Sheets("listes").Select
Sheets("listes").liste_dates.ListIndex = 0
End Sub |
Partager