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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
Public Sub copie_resultats()
Dim Nlogkf As Long, Npka As Long, Npksp As Long, Npoint As Long, Npkw As Integer
Dim Searchtext As Range
Dim Maslect1 As Range
Dim Maslect2 As Range
Dim Maslect3 As Range
Dim Ncomp As Long
Dim ConIl As Double, EspIlcont As Double
Dim l As Integer, c As Integer, i As Integer
Dim ILname As Variant
Nlogkf = 0
Npka = 0
Npksp = 0
Npkw = 1
For i = 441 To 2 Step -1
If Sheets("feuil1").Cells(i, 1).Value = "Log Kf" Then
Nlogkf = Nlogkf + 1
Else
If Sheets("feuil1").Cells(i, 1).Value = "pKa" Then
Npka = Npka + 1
Else
If Sheets("feuil1").Cells(i, 1).Value = "pKsp" Then
Npksp = Npksp + 1
End If
End If
End If
Next i
'Nombre de composés entrée
For i = 3 To 70
If Sheets("feuil1").Cells(1, i) <> "" Then
Ncomp = Ncomp + 1
End If
Next i
Npoint = Nlogkf + Npka + Npksp + Npkw
'ligne de depart pour les resultats
l = Npoint + 5
'colonne de dpart pour les resultat
c = 8
'ligne de lecture des resultats
j = l + 51
r = Ncomp + 4
i = 11
For k = Ncomp + Ncomp + 3 To Ncomp + 4 Step -1
ILname = Sheets("feuil1").Cells(l, k).Value
ConIl = Worksheets("feuil1").Cells(j, k).Value
For i = 11 To 40
If ILname = Sheets("Espèces").Cells(1, i) Then
Worksheets("Espèces").Cells(5, i).Value = Sheets("feuil1").Cells(j, k).Value
End If
MsgBox Sheets("feuil1").Cells(l, k).Value & " = " & Sheets("Espèces").Cells(1, i).Value
MsgBox Sheets("Espèces").Cells(5, i).Value & " = " & Sheets("feuil1").Cells(l + 51, k).Value
Next i
Next k
End Sub |
Partager