Mise en forme conditionnelle macro
Bonjour,
J'ai demandé votre aide pour un sujet similaire de mise en forme conditionnelle. Cependant, j'aimerais faire ce type de mise en forme via une macro
En effet, étant dans une entreprise agroalimentaire, j'ai besoin que quand un opérateur rentre des valeurs d'analyses, le résultat s'affiche en rouge si il est hors norme.
Jusqu'ici, tout va bien. Cependant, il existe plusieurs cahiers des charges selon le produit. Un produit = un cahier des charges (CDC) avec différents critères d'analyses (et des valeurs minimales et maximales à respecter).
Dans le fichier joint, il y a deux onglets.
Le premier "base de données" où les opérateurs peuvent noter leurs résultats d'analyses et un onglet "critères" avec les valeurs min/max à respecter selon le cahier des charges (CDC) sélectionné sur le premier onglet.
J'aimerais par exemple si on choisi dans l'onglet "base de données" le CDC n°1, que dans la colonne H2O, le résultat s'affiche en rouge si nous ne sommes pas dans les normes(pour cet exemple, en dessous en dessous de 120 et au dessus de 200). Et mettre dans la même cellule, une autre mise en forme conditionnelle (toujours sous forme de macro) si on choisi le cahier des charges n°2 que le résultat s'affiche en rouge en dessous de 200 et au dessus de 240 (critère pour ce type de CDC) etc ...
En espérant que vous allez pouvoir m'aider...
Je vous remercie par avance de votre aide
Bonjour EOK18, le forum,
[u]
Un essai....[/u]
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long, derlig As Long
Dim minVitC As Integer, maxVitC As Integer
Dim minH2O As Integer, maxH2O As Integer
Dim minMG As Integer, maxMG As Integer
derlig = Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To derlig
Select Case Range("B" & i).Value
Case Is = 1
minVitC = 0: maxVitC = 4
minH2O = 120: maxH2O = 200
minMG = 36: maxMG = 44
Case Is = 2
minVitC = 9: maxVitC = 12
minH2O = 200: maxH2O = 240
minMG = 40: maxMG = 45
Case Is = 3
minVitC = 10: maxVitC = 20
minH2O = 30: maxH2O = 100
minMG = 0: maxMG = 42
End Select
If Range("C" & i) < minH2O Or Range("C" & i) > maxH2O Then
Range("C" & i).Font.Color = vbRed
Else
Range("C" & i).Font.Color = vbGreen
End If
If Range("D" & i) < minMG Or Range("D" & i) > maxMG Then
Range("D" & i).Font.Color = vbRed
Else
Range("D" & i).Font.Color = vbGreen
End If
If Range("E" & i) < minVitC Or Range("E" & i) > maxVitC Then
Range("E" & i).Font.Color = vbRed
Else
Range("E" & i).Font.Color = vbGreen
End If
Next i
End Sub
Cordialement,
Bonjour,
Merci beaucoup pour votre aide
Le problème est que ma vraie base de données contient énormément de critères et de numéros de cahiers des charges (beaucoup plus que dans mon exemple...)
Y aurait-il un autre moyen pour m'éviter de renoter à chaque fois dans mon code les valeurs min et max de chaque critère ?
Cordialement,
Re,
Merci pour ton retour,
En effet, je pense qu'il faudra passer par un tableau de correspondance pour définir les valeurs min et max....
A tester....
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long, derlig As Long
Dim minVitC As Integer, maxVitC As Integer
Dim minH2O As Integer, maxH2O As Integer
Dim minMG As Integer, maxMG As Integer
Dim tableau As Range
derlig = Range("B" & Rows.Count).End(xlUp).Row
Set tableau = Sheets("critères").ListObjects("Tableau1").DataBodyRange
Application.ScreenUpdating = False
i = 2
While i <= derlig
minVitC = WorksheetFunction.VLookup(Range("B" & i), tableau, 2, False)
maxVitC = WorksheetFunction.VLookup(Range("B" & i), tableau, 3, False)
minH2O = WorksheetFunction.VLookup(Range("B" & i), tableau, 6, False)
maxH2O = WorksheetFunction.VLookup(Range("B" & i), tableau, 7, False)
minMG = WorksheetFunction.VLookup(Range("B" & i), tableau, 4, False)
maxMG = WorksheetFunction.VLookup(Range("B" & i), tableau, 5, False)
If Range("C" & i) < minH2O Or Range("C" & i) > maxH2O Then
Range("C" & i).Font.Color = vbRed '
Else
Range("C" & i).Font.Color = vbGreen
End If
If Range("D" & i) < minMG Or Range("D" & i) > maxMG Then
Range("D" & i).Font.Color = vbRed
Else
Range("D" & i).Font.Color = vbGreen
End If
If Range("E" & i) < minVitC Or Range("E" & i) > maxVitC Then
Range("E" & i).Font.Color = vbRed
Else
Range("E" & i).Font.Color = vbGreen
End If
i = i + 1
Wend
End Sub
Cordialement,
Bonjour xorsankukai,
J'ai recodé ma macro de façon à ce qu'elle puisse s'adapter à ma base de données.
Cependant, et j'espère que vous allez pouvoir m'aider, cela ne marche pas lorsque je l'exécute (en cliquant sur le bouton en forme de triangle en haut de ma page dans mon visual basic)
Peut être cela vient-il du début du code ? "Private Sub" ? En effet, j'avoue ne pas comprendre ce que cela veut dire ...
Merci pour votre aide !
Bonjour EOK18, le forum,
Private Sub Worksheet_Change(ByVal Target As Range)
Il s'agit d'une macro évènementielle, j’agis sur l'évènement change de la feuille "base de données".
La macro est exécutée à chaque modif. sur la feuille (de la ligne 2 à la dernière ligne).
Cordialement,
Malheureusement non je ne peux pas joindre le fichier...
J'ai essayé de mettre le code dans un module et non sur la feuille directement
J'ai essayé avec un bouton et ça ne marche toujours pas "Vlookup worksheet function a échoué"
Je vous montre mon code (qui est très long...) sachant que j'ai deux feuilles principales : "BDD" où les mises en forme conditionnelles sont appliquées et "BDD-CDC" qui est l'équivalent de "critères" dans le premier fichier envoyé
Sub test()
Dim i As Long, derlig As Long
Dim minH2O As Integer, maxH2O As Integer
Dim minprop As Integer, maxprop As Integer
Dim minpropchine As Integer, maxpropchine As Integer
Dim minNO3 As Integer, maxNO3 As Integer
Dim minNO2 As Integer, maxNO2 As Integer
Dim minNaNO2 As Integer, maxNaNO2 As Integer
Dim minMG As Integer, maxMG As Integer
Dim minMGLMG As Integer, maxMGLMG As Integer
Dim minMAT As Integer, maxMAT As Integer
Dim minMATESD As Integer, maxMATESD As Integer
Dim minpH As Integer, maxpH As Integer
Dim mincendres As Integer, maxcendres As Integer
Dim mindensitt As Integer, maxdensitt As Integer
Dim mindensitap As Integer, maxdensitap As Integer
Dim minmouill20 As Integer, maxmouill20 As Integer
Dim minmouill40 As Integer, maxmouill40 As Integer
Dim minmouill60 As Integer, maxmouill60 As Integer
Dim minVitC As Integer, maxVitC As Integer
Dim minsolub As Integer, maxsolub As Integer
Dim mininsolub As Integer, maxinsolub As Integer
Dim minLCHA As Integer, maxLCHA As Integer
Dim minADMI As Integer, maxADMI As Integer
Dim minAcidT As Integer, maxAcidT As Integer
Dim mindisp As Integer, maxdisp As Integer
Dim minbeck As Integer, maxbeck As Integer
Dim mindisp20 As Integer, maxdisp20 As Integer
Dim mindisp60 As Integer, maxdisp60 As Integer
Dim mingranu1 As Integer, maxgranu1 As Integer
Dim mingranu315 As Integer, maxgranu315 As Integer
Dim mingranu400 As Integer, maxgranu400 As Integer
Dim mingranu500 As Integer, maxgranu500 As Integer
Dim mingranu630 As Integer, maxgranu630 As Integer
Dim mingranu850 As Integer, maxgranu850 As Integer
Dim mingranufond As Integer, maxgranufond As Integer
Dim minantibio As Integer, maxantibio As Integer
Dim minglucides As Integer, maxglucides As Integer
Dim minorgano As Integer, maxorgano As Integer
Dim mincafe As Integer, maxcafe As Integer
Dim minlactate As Integer, maxlactate As Integer
Dim minlactose As Integer, maxlactose As Integer
Dim minlipase As Integer, maxlipase As Integer
Dim minWPN As Integer, maxWPN As Integer
Dim minbiberon As Integer, maxbiberon As Integer
Dim mincoli As Integer, maxcoli As Integer
Dim mincoli1 As Integer, maxcoli1 As Integer
Dim mincoli2 As Integer, maxcoli2 As Integer
Dim mincoli3 As Integer, maxcoli3 As Integer
Dim mincoli4 As Integer, maxcoli4 As Integer
Dim mincoli5 As Integer, maxcoli5 As Integer
Dim minecoli As Integer, maxecoli As Integer
Dim minASR37 As Integer, maxASR37 As Integer
Dim minASR46 As Integer, maxASR46 As Integer
Dim minASR46ext As Integer, maxASR46ext As Integer
Dim minperfr37 As Integer, maxperfr37 As Integer
Dim minperfr46 As Integer, maxperfr46 As Integer
Dim minflore As Integer, maxflore As Integer
Dim minflore1 As Integer, maxflore1 As Integer
Dim minflore2 As Integer, maxflore2 As Integer
Dim minflore3 As Integer, maxflore3 As Integer
Dim minflore4 As Integer, maxflore4 As Integer
Dim minflore5 As Integer, maxflore5 As Integer
Dim minlevures As Integer, maxlevures As Integer
Dim minmoisissures As Integer, maxmoisissures As Integer
Dim minLM As Integer, maxLM As Integer
Dim minstrept As Integer, maxstrept As Integer
Dim minstaph As Integer, maxstaph As Integer
Dim minstaph1 As Integer, maxstaph1 As Integer
Dim minstaph2 As Integer, maxstaph2 As Integer
Dim minstaph3 As Integer, maxstaph3 As Integer
Dim minstaph4 As Integer, maxstaph4 As Integer
Dim minstaph5 As Integer, maxstaph5 As Integer
Dim minbacillus As Integer, maxbacillus As Integer
Dim minentero5x10 As Integer, maxentero5x10 As Integer
Dim minentero10x10 As Integer, maxentero10x10 As Integer
Dim minentero As Integer, maxentero As Integer
Dim minenteropos As Integer, maxenteropos As Integer
Dim mincrono25 As Integer, maxcrono25 As Integer
Dim mincrono10x30 As Integer, maxcrono10x30 As Integer
Dim mincrono3x100 As Integer, maxcrono3x100 As Integer
Dim minsalmo251 As Integer, maxsalmo251 As Integer
Dim minsalmo252 As Integer, maxsalmo252 As Integer
Dim minsalmo253 As Integer, maxsalmo253 As Integer
Dim minsalmo254 As Integer, maxsalmo254 As Integer
Dim minsalmo255 As Integer, maxsalmo255 As Integer
Dim minsalmo5x25 As Integer, maxsalmo5x25 As Integer
Dim minsalmo30x25 As Integer, maxsalmo30x25 As Integer
Dim minsalmo30 As Integer, maxsalmo30 As Integer
Dim minsalmo125 As Integer, maxsalmo125 As Integer
Dim minsalmo4x125 As Integer, maxsalmo4x125 As Integer
Dim minsalmo250 As Integer, maxsalmo250 As Integer
Dim minlisteria25 As Integer, maxlisteria25 As Integer
Dim minlisteria10x25 As Integer, maxlisteria10x25 As Integer
Dim minsporemeso As Integer, maxsporemeso As Integer
Dim minsporethermo As Integer, maxsporethermo As Integer
Dim minsporethermo1 As Integer, maxsporethermo1 As Integer
Dim minsporethermoder As Integer, maxsporethermoder As Integer
Dim minpatho As Integer, maxpatho As Integer
Dim minsulfo As Integer, maxsulfo As Integer
Dim minchlo As Integer, maxchlo As Integer
Dim minpenic As Integer, maxpenic As Integer
Dim minchlorine As Integer, maxchlorine As Integer
Dim minaflatoxine As Integer, maxaflatoxine As Integer
Dim minmelamine As Integer, maxmelamine As Integer
Dim mindioxine As Integer, maxdioxine As Integer
Dim minPb As Integer, maxPb As Integer
Dim minCd As Integer, maxCd As Integer
Dim minHg As Integer, maxHg As Integer
Dim minAs As Integer, maxAs As Integer
Dim minCr As Integer, maxCr As Integer
Dim minSb As Integer, maxSb As Integer
Dim minSn As Integer, maxSn As Integer
Dim tableau As Range
derlig = Range("I" & Rows.Count).End(xlUp).Row
Set tableau = Sheets("BDD-CDC").ListObjects("Tableau1").DataBodyRange
Application.ScreenUpdating = False
i = 6
While i <= derlig
If Range("I" & i) <> "" Then
minH2O = WorksheetFunction.VLookup(Range("I" & i), tableau, 2, False)
maxH2O = WorksheetFunction.VLookup(Range("I" & i), tableau, 3, False)
minprop = WorksheetFunction.VLookup(Range("I" & i), tableau, 4, False)
maxprop = WorksheetFunction.VLookup(Range("I" & i), tableau, 5, False)
minpropchine = WorksheetFunction.VLookup(Range("I" & i), tableau, 6, False)
maxpropchine = WorksheetFunction.VLookup(Range("I" & i), tableau, 7, False)
minNO3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 8, False)
maxNO3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 9, False)
minNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 10, False)
maxNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 11, False)
minNaNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 12, False)
maxNaNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 13, False)
minMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 14, False)
maxMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 15, False)
minMGLMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 16, False)
maxMGLMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 17, False)
minMAT = WorksheetFunction.VLookup(Range("I" & i), tableau, 18, False)
maxMAT = WorksheetFunction.VLookup(Range("I" & i), tableau, 19, False)
minMATESD = WorksheetFunction.VLookup(Range("I" & i), tableau, 20, False)
maxMATESD = WorksheetFunction.VLookup(Range("I" & i), tableau, 21, False)
minpH = WorksheetFunction.VLookup(Range("I" & i), tableau, 22, False)
maxpH = WorksheetFunction.VLookup(Range("I" & i), tableau, 23, False)
mincendres = WorksheetFunction.VLookup(Range("I" & i), tableau, 24, False)
maxcendres = WorksheetFunction.VLookup(Range("I" & i), tableau, 25, False)
mindensitt = WorksheetFunction.VLookup(Range("I" & i), tableau, 26, False)
maxdensitt = WorksheetFunction.VLookup(Range("I" & i), tableau, 27, False)
mindensitap = WorksheetFunction.VLookup(Range("I" & i), tableau, 28, False)
maxdensitap = WorksheetFunction.VLookup(Range("I" & i), tableau, 29, False)
minmouill20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 30, False)
maxmouill20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 31, False)
minmouill40 = WorksheetFunction.VLookup(Range("I" & i), tableau, 32, False)
maxmouill40 = WorksheetFunction.VLookup(Range("I" & i), tableau, 33, False)
minmouill60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 34, False)
maxmouill60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 35, False)
minVitC = WorksheetFunction.VLookup(Range("I" & i), tableau, 36, False)
maxVitC = WorksheetFunction.VLookup(Range("I" & i), tableau, 37, False)
minsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 38, False)
maxsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 39, False)
mininsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 40, False)
maxinsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 41, False)
minLCHA = WorksheetFunction.VLookup(Range("I" & i), tableau, 42, False)
maxLCHA = WorksheetFunction.VLookup(Range("I" & i), tableau, 43, False)
minADMI = WorksheetFunction.VLookup(Range("I" & i), tableau, 44, False)
maxADMI = WorksheetFunction.VLookup(Range("I" & i), tableau, 45, False)
minAcidT = WorksheetFunction.VLookup(Range("I" & i), tableau, 46, False)
maxAcidT = WorksheetFunction.VLookup(Range("I" & i), tableau, 47, False)
mindisp = WorksheetFunction.VLookup(Range("I" & i), tableau, 48, False)
maxdisp = WorksheetFunction.VLookup(Range("I" & i), tableau, 49, False)
minbeck = WorksheetFunction.VLookup(Range("I" & i), tableau, 50, False)
maxbeck = WorksheetFunction.VLookup(Range("I" & i), tableau, 51, False)
mindisp20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 52, False)
maxdisp20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 53, False)
mindisp60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 54, False)
maxdisp60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 55, False)
mingranu1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 56, False)
maxgranu1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 57, False)
mingranu315 = WorksheetFunction.VLookup(Range("I" & i), tableau, 58, False)
maxgranu315 = WorksheetFunction.VLookup(Range("I" & i), tableau, 59, False)
mingranu400 = WorksheetFunction.VLookup(Range("I" & i), tableau, 60, False)
maxgranu400 = WorksheetFunction.VLookup(Range("I" & i), tableau, 61, False)
mingranu500 = WorksheetFunction.VLookup(Range("I" & i), tableau, 62, False)
maxgranu500 = WorksheetFunction.VLookup(Range("I" & i), tableau, 62, False)
mingranu630 = WorksheetFunction.VLookup(Range("I" & i), tableau, 63, False)
maxgranu630 = WorksheetFunction.VLookup(Range("I" & i), tableau, 64, False)
mingranu850 = WorksheetFunction.VLookup(Range("I" & i), tableau, 65, False)
maxgranu850 = WorksheetFunction.VLookup(Range("I" & i), tableau, 66, False)
mingranufond = WorksheetFunction.VLookup(Range("I" & i), tableau, 67, False)
maxgranufond = WorksheetFunction.VLookup(Range("I" & i), tableau, 68, False)
minantibio = WorksheetFunction.VLookup(Range("I" & i), tableau, 69, False)
maxantibio = WorksheetFunction.VLookup(Range("I" & i), tableau, 70, False)
minglucides = WorksheetFunction.VLookup(Range("I" & i), tableau, 71, False)
maxglucides = WorksheetFunction.VLookup(Range("I" & i), tableau, 72, False)
minorgano = WorksheetFunction.VLookup(Range("I" & i), tableau, 73, False)
maxorgano = WorksheetFunction.VLookup(Range("I" & i), tableau, 74, False)
mincafe = WorksheetFunction.VLookup(Range("I" & i), tableau, 75, False)
maxcafe = WorksheetFunction.VLookup(Range("I" & i), tableau, 76, False)
minlactate = WorksheetFunction.VLookup(Range("I" & i), tableau, 77, False)
maxlactate = WorksheetFunction.VLookup(Range("I" & i), tableau, 78, False)
minlactose = WorksheetFunction.VLookup(Range("I" & i), tableau, 79, False)
maxlactose = WorksheetFunction.VLookup(Range("I" & i), tableau, 80, False)
minlipase = WorksheetFunction.VLookup(Range("I" & i), tableau, 81, False)
maxlipase = WorksheetFunction.VLookup(Range("I" & i), tableau, 82, False)
minWPN = WorksheetFunction.VLookup(Range("I" & i), tableau, 83, False)
maxWPN = WorksheetFunction.VLookup(Range("I" & i), tableau, 84, False)
minbiberon = WorksheetFunction.VLookup(Range("I" & i), tableau, 85, False)
maxbiberon = WorksheetFunction.VLookup(Range("I" & i), tableau, 86, False)
mincoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 87, False)
maxcoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 88, False)
mincoli1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 89, False)
maxcoli1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 90, False)
mincoli2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 91, False)
maxcoli2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 92, False)
mincoli3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 93, False)
maxcoli3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 94, False)
mincoli4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 95, False)
maxcoli4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 96, False)
mincoli5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 97, False)
maxcoli5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 98, False)
minecoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 99, False)
maxecoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 100, False)
minASR37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 101, False)
maxASR37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 102, False)
minASR46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 103, False)
maxASR46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 104, False)
minASR46ext = WorksheetFunction.VLookup(Range("I" & i), tableau, 105, False)
maxASR46ext = WorksheetFunction.VLookup(Range("I" & i), tableau, 106, False)
minperfr37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 107, False)
maxperfr37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 108, False)
minperfr46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 109, False)
maxperfr46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 110, False)
minflore = WorksheetFunction.VLookup(Range("I" & i), tableau, 111, False)
maxflore = WorksheetFunction.VLookup(Range("I" & i), tableau, 112, False)
minflore1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 113, False)
maxflore1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 114, False)
minflore2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 115, False)
maxflore2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 116, False)
minflore3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 117, False)
maxflore3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 118, False)
minflore4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 119, False)
maxflore4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 120, False)
minflore5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 121, False)
maxflore5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 122, False)
minlevures = WorksheetFunction.VLookup(Range("I" & i), tableau, 123, False)
maxlevures = WorksheetFunction.VLookup(Range("I" & i), tableau, 124, False)
minmoisissures = WorksheetFunction.VLookup(Range("I" & i), tableau, 125, False)
maxmoisissures = WorksheetFunction.VLookup(Range("I" & i), tableau, 126, False)
minLM = WorksheetFunction.VLookup(Range("I" & i), tableau, 127, False)
maxLM = WorksheetFunction.VLookup(Range("I" & i), tableau, 128, False)
minstrept = WorksheetFunction.VLookup(Range("I" & i), tableau, 129, False)
maxstrept = WorksheetFunction.VLookup(Range("I" & i), tableau, 130, False)
minstaph = WorksheetFunction.VLookup(Range("I" & i), tableau, 131, False)
maxstaph = WorksheetFunction.VLookup(Range("I" & i), tableau, 132, False)
minstaph1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 133, False)
maxstaph1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 134, False)
minstaph2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 135, False)
maxstaph2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 136, False)
minstaph3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 137, False)
maxstaph3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 138, False)
minstaph4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 139, False)
maxstaph4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 140, False)
minstaph5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 141, False)
maxstaph5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 142, False)
minbacillus = WorksheetFunction.VLookup(Range("I" & i), tableau, 143, False)
maxbacillus = WorksheetFunction.VLookup(Range("I" & i), tableau, 144, False)
minentero5x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 145, False)
maxentero5x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 146, False)
minentero10x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 147, False)
maxentero10x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 148, False)
minentero = WorksheetFunction.VLookup(Range("I" & i), tableau, 149, False)
maxentero = WorksheetFunction.VLookup(Range("I" & i), tableau, 150, False)
minenteropos = WorksheetFunction.VLookup(Range("I" & i), tableau, 151, False)
maxenteropos = WorksheetFunction.VLookup(Range("I" & i), tableau, 152, False)
mincrono25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 153, False)
maxcrono25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 154, False)
mincrono10x30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 155, False)
maxcrono10x30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 156, False)
mincrono3x100 = WorksheetFunction.VLookup(Range("I" & i), tableau, 157, False)
maxcrono3x100 = WorksheetFunction.VLookup(Range("I" & i), tableau, 158, False)
minsalmo251 = WorksheetFunction.VLookup(Range("I" & i), tableau, 159, False)
maxsalmo251 = WorksheetFunction.VLookup(Range("I" & i), tableau, 160, False)
minsalmo252 = WorksheetFunction.VLookup(Range("I" & i), tableau, 161, False)
maxsalmo252 = WorksheetFunction.VLookup(Range("I" & i), tableau, 162, False)
minsalmo253 = WorksheetFunction.VLookup(Range("I" & i), tableau, 163, False)
maxsalmo253 = WorksheetFunction.VLookup(Range("I" & i), tableau, 164, False)
minsalmo254 = WorksheetFunction.VLookup(Range("I" & i), tableau, 165, False)
maxsalmo254 = WorksheetFunction.VLookup(Range("I" & i), tableau, 166, False)
minsalmo255 = WorksheetFunction.VLookup(Range("I" & i), tableau, 167, False)
maxsalmo255 = WorksheetFunction.VLookup(Range("I" & i), tableau, 168, False)
minsalmo5x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 169, False)
maxsalmo5x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 170, False)
minsalmo30x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 171, False)
maxsalmo30x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 172, False)
minsalmo30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 173, False)
maxsalmo30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 174, False)
minsalmo125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 175, False)
maxsalmo125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 176, False)
minsalmo4x125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 177, False)
maxsalmo4x125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 178, False)
minsalmo250 = WorksheetFunction.VLookup(Range("I" & i), tableau, 179, False)
maxsalmo250 = WorksheetFunction.VLookup(Range("I" & i), tableau, 180, False)
minlisteria25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 181, False)
maxlisteria25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 182, False)
minlisteria10x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 183, False)
maxlisteria10x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 184, False)
minsporemeso = WorksheetFunction.VLookup(Range("I" & i), tableau, 185, False)
maxsporemeso = WorksheetFunction.VLookup(Range("I" & i), tableau, 186, False)
minsporethermo = WorksheetFunction.VLookup(Range("I" & i), tableau, 187, False)
maxsporethermo = WorksheetFunction.VLookup(Range("I" & i), tableau, 188, False)
minsporethermo1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 189, False)
maxsporethermo1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 190, False)
minsporethermoder = WorksheetFunction.VLookup(Range("I" & i), tableau, 191, False)
maxsporethermoder = WorksheetFunction.VLookup(Range("I" & i), tableau, 192, False)
minpatho = WorksheetFunction.VLookup(Range("I" & i), tableau, 193, False)
maxpatho = WorksheetFunction.VLookup(Range("I" & i), tableau, 194, False)
minsulfo = WorksheetFunction.VLookup(Range("I" & i), tableau, 195, False)
maxsulfo = WorksheetFunction.VLookup(Range("I" & i), tableau, 196, False)
minchlo = WorksheetFunction.VLookup(Range("I" & i), tableau, 197, False)
maxchlo = WorksheetFunction.VLookup(Range("I" & i), tableau, 198, False)
minpenic = WorksheetFunction.VLookup(Range("I" & i), tableau, 199, False)
maxpenic = WorksheetFunction.VLookup(Range("I" & i), tableau, 200, False)
minchlorine = WorksheetFunction.VLookup(Range("I" & i), tableau, 201, False)
maxchlorine = WorksheetFunction.VLookup(Range("I" & i), tableau, 202, False)
minaflatoxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 203, False)
maxaflatoxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 204, False)
minmelamine = WorksheetFunction.VLookup(Range("I" & i), tableau, 205, False)
maxmelamine = WorksheetFunction.VLookup(Range("I" & i), tableau, 206, False)
mindioxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 207, False)
maxdioxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 208, False)
minPb = WorksheetFunction.VLookup(Range("I" & i), tableau, 209, False)
maxPb = WorksheetFunction.VLookup(Range("I" & i), tableau, 210, False)
minCd = WorksheetFunction.VLookup(Range("I" & i), tableau, 211, False)
maxCd = WorksheetFunction.VLookup(Range("I" & i), tableau, 212, False)
minHg = WorksheetFunction.VLookup(Range("I" & i), tableau, 213, False)
maxHg = WorksheetFunction.VLookup(Range("I" & i), tableau, 214, False)
minAs = WorksheetFunction.VLookup(Range("I" & i), tableau, 215, False)
maxAs = WorksheetFunction.VLookup(Range("I" & i), tableau, 216, False)
minCr = WorksheetFunction.VLookup(Range("I" & i), tableau, 217, False)
maxCr = WorksheetFunction.VLookup(Range("I" & i), tableau, 218, False)
minSb = WorksheetFunction.VLookup(Range("I" & i), tableau, 219, False)
maxSb = WorksheetFunction.VLookup(Range("I" & i), tableau, 220, False)
minSn = WorksheetFunction.VLookup(Range("I" & i), tableau, 221, False)
maxSn = WorksheetFunction.VLookup(Range("I" & i), tableau, 222, False)
End If
If Range("AE" & i) < minH2O Or Range("AE" & i) > maxH2O Then
Range("AE" & i).Font.Color = vbRed
Else
Range("AE" & i).Font.Color = vbBlack
End If
If Range("DK" & i) < minNO3 Or Range("DK" & i) > maxNO3 Then
Range("DK" & i).Font.Color = vbRed
Else
Range("DK" & i).Font.Color = vbBlack
End If
If Range("DM" & i) < minNO2 Or Range("DM" & i) > maxNO2 Then
Range("DM" & i).Font.Color = vbRed
Else
Range("DM" & i).Font.Color = vbBlack
End If
If Range("AM" & i) < minMG Or Range("AM" & i) > maxMG Then
Range("AM" & i).Font.Color = vbRed
Else
Range("AM" & i).Font.Color = vbBlack
End If
If Range("BG" & i) < minMGLMG Or Range("BG" & i) > maxMGLMG Then
Range("BG" & i).Font.Color = vbRed
Else
Range("BG" & i).Font.Color = vbBlack
End If
If Range("AU" & i) < minpH Or Range("AU" & i) > maxpH Then
Range("AU" & i).Font.Color = vbRed
Else
Range("AU" & i).Font.Color = vbBlack
End If
If Range("DO" & i) < mincendres Or Range("DO" & i) > maxcendres Then
Range("DO" & i).Font.Color = vbRed
Else
Range("DO" & i).Font.Color = vbBlack
End If
If Range("AI" & i) < mindensitt Or Range("AI" & i) > maxdensitt Then
Range("AI" & i).Font.Color = vbRed
Else
Range("AI" & i).Font.Color = vbBlack
End If
If Range("AK" & i) < mindensitap Or Range("AK" & i) > maxdensitap Then
Range("AK" & i).Font.Color = vbRed
Else
Range("AK" & i).Font.Color = vbBlack
End If
If Range("BY" & i) < minmouill20 Or Range("BY" & i) > maxmouill20 Then
Range("BY" & i).Font.Color = vbRed
Else
Range("BY" & i).Font.Color = vbBlack
End If
If Range("CA" & i) < minmouill40 Or Range("CA" & i) > maxmouill40 Then
Range("CA" & i).Font.Color = vbRed
Else
Range("CA" & i).Font.Color = vbBlack
End If
If Range("CC" & i) < minmouill60 Or Range("CC" & i) > maxmouill60 Then
Range("CC" & i).Font.Color = vbRed
Else
Range("CC" & i).Font.Color = vbBlack
End If
If Range("AO" & i) < minVitC Or Range("AO" & i) > maxVitC Then
Range("AO" & i).Font.Color = vbRed
Else
Range("AO" & i).Font.Color = vbBlack
End If
If Range("AS" & i) < minsolub Or Range("AS" & i) > maxsolub Then
Range("AS" & i).Font.Color = vbRed
Else
Range("AS" & i).Font.Color = vbBlack
End If
If Range("AQ" & i) < mininsolub Or Range("AQ" & i) > maxinsolub Then
Range("AQ" & i).Font.Color = vbRed
Else
Range("AQ" & i).Font.Color = vbBlack
End If
If Range("CE" & i) < minLCHA Or Range("CE" & i) > maxLCHA Then
Range("CE" & i).Font.Color = vbRed
Else
Range("CE" & i).Font.Color = vbBlack
End If
If Range("CG" & i) < minADMI Or Range("CG" & i) > maxADMI Then
Range("CG" & i).Font.Color = vbRed
Else
Range("CG" & i).Font.Color = vbBlack
End If
If Range("CI" & i) < minAcidT Or Range("CI" & i) > maxAcidT Then
Range("CI" & i).Font.Color = vbRed
Else
Range("CI" & i).Font.Color = vbBlack
End If
If Range("BU" & i) < mindisp Or Range("BU" & i) > maxdisp Then
Range("BU" & i).Font.Color = vbRed
Else
Range("BU" & i).Font.Color = vbBlack
End If
If Range("BS" & i) < minbeck Or Range("BS" & i) > maxbeck Then
Range("BS" & i).Font.Color = vbRed
Else
Range("BS" & i).Font.Color = vbBlack
End If
If Range("BO" & i) < mindisp20 Or Range("BO" & i) > maxdisp20 Then
Range("BO" & i).Font.Color = vbRed
Else
Range("BO" & i).Font.Color = vbBlack
End If
If Range("BQ" & i) < mindisp60 Or Range("BQ" & i) > maxdisp60 Then
Range("BQ" & i).Font.Color = vbRed
Else
Range("BQ" & i).Font.Color = vbBlack
End If
If Range("CU" & i) < mingranu1 Or Range("CU" & i) > maxgranu1 Then
Range("CU" & i).Font.Color = vbRed
Else
Range("CU" & i).Font.Color = vbBlack
End If
If Range("CW" & i) < mingranu315 Or Range("CW" & i) > maxgranu315 Then
Range("CW" & i).Font.Color = vbRed
Else
Range("CW" & i).Font.Color = vbBlack
End If
If Range("CY" & i) < mingranu400 Or Range("CY" & i) > maxgranu400 Then
Range("CY" & i).Font.Color = vbRed
Else
Range("CY" & i).Font.Color = vbBlack
End If
If Range("DA" & i) < mingranu500 Or Range("DA" & i) > maxgranu500 Then
Range("DA" & i).Font.Color = vbRed
Else
Range("DA" & i).Font.Color = vbBlack
End If
If Range("DC" & i) < mingranu630 Or Range("DC" & i) > maxgranu630 Then
Range("DC" & i).Font.Color = vbRed
Else
Range("DC" & i).Font.Color = vbBlack
End If
If Range("DE" & i) < mingranu850 Or Range("DE" & i) > maxgranu850 Then
Range("DE" & i).Font.Color = vbRed
Else
Range("DE" & i).Font.Color = vbBlack
End If
If Range("DG" & i) < mingranufond Or Range("DG" & i) > maxgranufond Then
Range("DG" & i).Font.Color = vbRed
Else
Range("DG" & i).Font.Color = vbBlack
End If
If Range("DU" & i) < minantibio Or Range("DU" & i) > maxantibio Then
Range("DU" & i).Font.Color = vbRed
Else
Range("DU" & i).Font.Color = vbBlack
End If
If Range("CQ" & i) < mincafe Or Range("CQ" & i) > maxcafe Then
Range("CQ" & i).Font.Color = vbRed
Else
Range("CQ" & i).Font.Color = vbBlack
End If
If Range("BW" & i) < minlactate Or Range("BW" & i) > maxlactate Then
Range("BW" & i).Font.Color = vbRed
Else
Range("BW" & i).Font.Color = vbBlack
End If
If Range("DM" & i) < minlactose Or Range("DM" & i) > maxlactose Then
Range("DM" & i).Font.Color = vbRed
Else
Range("DM" & i).Font.Color = vbBlack
End If
If Range("DQ" & i) < minlipase Or Range("DQ" & i) > maxlipase Then
Range("DQ" & i).Font.Color = vbRed
Else
Range("DQ" & i).Font.Color = vbBlack
End If
If Range("BC" & i) < minWPN Or Range("BC" & i) > maxWPN Then
Range("BC" & i).Font.Color = vbRed
Else
Range("BC" & i).Font.Color = vbBlack
End If
If Range("CS" & i) < minbiberon Or Range("CS" & i) > maxbiberon Then
Range("CS" & i).Font.Color = vbRed
Else
Range("CS" & i).Font.Color = vbBlack
End If
If Range("DW" & i) < mincoli Or Range("DW" & i) > maxcoli Then
Range("DW" & i).Font.Color = vbRed
Else
Range("DW" & i).Font.Color = vbBlack
End If
If Range("DY" & i) < mincoli1 Or Range("DY" & i) > maxcoli1 Then
Range("DY" & i).Font.Color = vbRed
Else
Range("DY" & i).Font.Color = vbBlack
End If
If Range("EA" & i) < mincoli2 Or Range("EA" & i) > maxcoli2 Then
Range("EA" & i).Font.Color = vbRed
Else
Range("EA" & i).Font.Color = vbBlack
End If
If Range("EC" & i) < mincoli3 Or Range("EC" & i) > maxcoli3 Then
Range("EC" & i).Font.Color = vbRed
Else
Range("EC" & i).Font.Color = vbBlack
End If
If Range("EE" & i) < mincoli4 Or Range("EE" & i) > maxcoli4 Then
Range("EE" & i).Font.Color = vbRed
Else
Range("EE" & i).Font.Color = vbBlack
End If
If Range("EG" & i) < mincoli5 Or Range("EG" & i) > maxcoli5 Then
Range("EG" & i).Font.Color = vbRed
Else
Range("EG" & i).Font.Color = vbBlack
End If
If Range("HO" & i) < minecoli Or Range("HO" & i) > maxecoli Then
Range("HO" & i).Font.Color = vbRed
Else
Range("HO" & i).Font.Color = vbBlack
End If
If Range("EI" & i) < minASR37 Or Range("EI" & i) > maxASR37 Then
Range("EI" & i).Font.Color = vbRed
Else
Range("EI" & i).Font.Color = vbBlack
End If
If Range("EK" & i) < minASR46 Or Range("EK" & i) > maxASR46 Then
Range("EK" & i).Font.Color = vbRed
Else
Range("EK" & i).Font.Color = vbBlack
End If
If Range("EM" & i) < minASR46ext Or Range("EM" & i) > maxASR46ext Then
Range("EM" & i).Font.Color = vbRed
Else
Range("EM" & i).Font.Color = vbBlack
End If
If Range("EO" & i) < minperfr37 Or Range("EO" & i) > maxperfr37 Then
Range("EO" & i).Font.Color = vbRed
Else
Range("EO" & i).Font.Color = vbBlack
End If
If Range("EQ" & i) < minperfr46 Or Range("EQ" & i) > maxperfr46 Then
Range("EQ" & i).Font.Color = vbRed
Else
Range("EQ" & i).Font.Color = vbBlack
End If
If Range("ES" & i) < minflore Or Range("ES" & i) > maxflore Then
Range("ES" & i).Font.Color = vbRed
Else
Range("ES" & i).Font.Color = vbBlack
End If
If Range("EU" & i) < minflore1 Or Range("EU" & i) > maxflore1 Then
Range("EU" & i).Font.Color = vbRed
Else
Range("EU" & i).Font.Color = vbBlack
End If
If Range("EW" & i) < minflore2 Or Range("EW" & i) > maxflore2 Then
Range("EW" & i).Font.Color = vbRed
Else
Range("EW" & i).Font.Color = vbBlack
End If
If Range("EY" & i) < minflore3 Or Range("EY" & i) > maxflore3 Then
Range("EY" & i).Font.Color = vbRed
Else
Range("EY" & i).Font.Color = vbBlack
End If
If Range("FA" & i) < minflore4 Or Range("FA" & i) > maxflore4 Then
Range("FA" & i).Font.Color = vbRed
Else
Range("FA" & i).Font.Color = vbBlack
End If
If Range("FC" & i) < minflore5 Or Range("FC" & i) > maxflore5 Then
Range("FC" & i).Font.Color = vbRed
Else
Range("FC" & i).Font.Color = vbBlack
End If
If Range("FE" & i) < minlevures Or Range("FE" & i) > maxlevures Then
Range("FE" & i).Font.Color = vbRed
Else
Range("FE" & i).Font.Color = vbBlack
End If
If Range("FG" & i) < minmoisissures Or Range("FG" & i) > maxmoisissures Then
Range("FG" & i).Font.Color = vbRed
Else
Range("FG" & i).Font.Color = vbBlack
End If
If Range("FI" & i) < minLM Or Range("FI" & i) > maxLM Then
Range("FI" & i).Font.Color = vbRed
Else
Range("FI" & i).Font.Color = vbBlack
End If
If Range("FK" & i) < minstrept Or Range("FK" & i) > maxstrept Then
Range("FK" & i).Font.Color = vbRed
Else
Range("FK" & i).Font.Color = vbBlack
End If
If Range("FM" & i) < minstaph Or Range("FM" & i) > maxstaph Then
Range("FM" & i).Font.Color = vbRed
Else
Range("FM" & i).Font.Color = vbBlack
End If
If Range("FO" & i) < minstaph1 Or Range("FO" & i) > maxstaph1 Then
Range("FO" & i).Font.Color = vbRed
Else
Range("FO" & i).Font.Color = vbBlack
End If
If Range("FQ" & i) < minstaph2 Or Range("FQ" & i) > maxstaph2 Then
Range("FQ" & i).Font.Color = vbRed
Else
Range("FQ" & i).Font.Color = vbBlack
End If
If Range("FS" & i) < minstaph3 Or Range("FS" & i) > maxstaph3 Then
Range("FS" & i).Font.Color = vbRed
Else
Range("FS" & i).Font.Color = vbBlack
End If
If Range("FU" & i) < minstaph4 Or Range("FU" & i) > maxstaph4 Then
Range("FU" & i).Font.Color = vbRed
Else
Range("FU" & i).Font.Color = vbBlack
End If
If Range("FW" & i) < minstaph5 Or Range("FW" & i) > maxstaph5 Then
Range("FW" & i).Font.Color = vbRed
Else
Range("FW" & i).Font.Color = vbBlack
End If
If Range("FY" & i) < minbacillus Or Range("FY" & i) > maxbacillus Then
Range("FY" & i).Font.Color = vbRed
Else
Range("FY" & i).Font.Color = vbBlack
End If
If Range("GC" & i) < minentero5x10 Or Range("GC" & i) > maxentero5x10 Then
Range("GC" & i).Font.Color = vbRed
Else
Range("GC" & i).Font.Color = vbBlack
End If
If Range("GE" & i) < minentero10x10 Or Range("GE" & i) > maxentero10x10 Then
Range("GE" & i).Font.Color = vbRed
Else
Range("GE" & i).Font.Color = vbBlack
End If
If Range("GA" & i) < minentero Or Range("GA" & i) > maxentero Then
Range("GA" & i).Font.Color = vbRed
Else
Range("GA" & i).Font.Color = vbBlack
End If
If Range("GG" & i) < minenteropos Or Range("GG" & i) > maxenteropos Then
Range("GG" & i).Font.Color = vbRed
Else
Range("GG" & i).Font.Color = vbBlack
End If
If Range("GI" & i) < mincrono25 Or Range("GI" & i) > maxcrono25 Then
Range("GI" & i).Font.Color = vbRed
Else
Range("GI" & i).Font.Color = vbBlack
End If
If Range("GK" & i) < mincrono10x30 Or Range("GK" & i) > maxcrono10x30 Then
Range("GK" & i).Font.Color = vbRed
Else
Range("GK" & i).Font.Color = vbBlack
End If
If Range("GM" & i) < mincrono3x100 Or Range("GM" & i) > maxcrono3x100 Then
Range("GM" & i).Font.Color = vbRed
Else
Range("GM" & i).Font.Color = vbBlack
End If
If Range("GS" & i) < minsalmo251 Or Range("GS" & i) > maxsalmo251 Then
Range("GS" & i).Font.Color = vbRed
Else
Range("GS" & i).Font.Color = vbBlack
End If
If Range("GU" & i) < minsalmo252 Or Range("GU" & i) > maxsalmo252 Then
Range("GU" & i).Font.Color = vbRed
Else
Range("GU" & i).Font.Color = vbBlack
End If
If Range("GW" & i) < minsalmo253 Or Range("GW" & i) > maxsalmo253 Then
Range("GW" & i).Font.Color = vbRed
Else
Range("GW" & i).Font.Color = vbBlack
End If
If Range("GY" & i) < minsalmo254 Or Range("GY" & i) > maxsalmo254 Then
Range("GY" & i).Font.Color = vbRed
Else
Range("GY" & i).Font.Color = vbBlack
End If
If Range("HA" & i) < minsalmo255 Or Range("HA" & i) > maxsalmo255 Then
Range("HA" & i).Font.Color = vbRed
Else
Range("HA" & i).Font.Color = vbBlack
End If
If Range("HC" & i) < minsalmo5x25 Or Range("HC" & i) > maxsalmo5x25 Then
Range("HC" & i).Font.Color = vbRed
Else
Range("HC" & i).Font.Color = vbBlack
End If
If Range("HE" & i) < minsalmo30x25 Or Range("HE" & i) > maxsalmo30x25 Then
Range("HE" & i).Font.Color = vbRed
Else
Range("HE" & i).Font.Color = vbBlack
End If
If Range("HG" & i) < minsalmo30 Or Range("HG" & i) > maxsalmo30 Then
Range("HG" & i).Font.Color = vbRed
Else
Range("HG" & i).Font.Color = vbBlack
End If
If Range("HI" & i) < minsalmo125 Or Range("HI" & i) > maxsalmo125 Then
Range("HI" & i).Font.Color = vbRed
Else
Range("HI" & i).Font.Color = vbBlack
End If
If Range("HK" & i) < minsalmo4x125 Or Range("HK" & i) > maxsalmo4x125 Then
Range("HK" & i).Font.Color = vbRed
Else
Range("HK" & i).Font.Color = vbBlack
End If
If Range("HM" & i) < minsalmo250 Or Range("HM" & i) > maxsalmo250 Then
Range("HM" & i).Font.Color = vbRed
Else
Range("HM" & i).Font.Color = vbBlack
End If
If Range("HQ" & i) < minlisteria25 Or Range("HQ" & i) > maxlisteria25 Then
Range("HQ" & i).Font.Color = vbRed
Else
Range("HQ" & i).Font.Color = vbBlack
End If
If Range("HS" & i) < minlisteria10x25 Or Range("HS" & i) > maxlisteria10x25 Then
Range("HS" & i).Font.Color = vbRed
Else
Range("HS" & i).Font.Color = vbBlack
End If
If Range("HX" & i) < minsporemeso Or Range("HX" & i) > maxsporemeso Then
Range("HX" & i).Font.Color = vbRed
Else
Range("HX" & i).Font.Color = vbBlack
End If
If Range("HZ" & i) < minsporethermo Or Range("HZ" & i) > maxsporethermo Then
Range("HZ" & i).Font.Color = vbRed
Else
Range("HZ" & i).Font.Color = vbBlack
End If
If Range("IB" & i) < minsporethermo1 Or Range("IB" & i) > maxsporethermo1 Then
Range("IB" & i).Font.Color = vbRed
Else
Range("IB" & i).Font.Color = vbBlack
End If
If Range("ID" & i) < minsporethermoder Or Range("ID" & i) > maxsporethermoder Then
Range("ID" & i).Font.Color = vbRed
Else
Range("ID" & i).Font.Color = vbBlack
End If
i = i + 1
Wend
End Sub
Cordialement,
Re,
Malheureusement non je ne peux pas joindre le fichier...
Dommage....
"Vlookup worksheet function a échoué"
La RechercheV plante car elle ne doit pas trouver la correspondance....
Le tableau de correspondance se nomme bien Tableau1 ? (pas d'espace superflu ?)
La valeur cherchée de la colonne I de la feuille BDD est bien présente dans la première colonne du Tableau1 ?
Pour contourner l'erreur et voir si la macro poursuit la boucle, essaie d'ajouter "on error resume next"
'''
If Range("I" & i) <> "" Then
on error resume next
minH2O = WorksheetFunction.VLookup(Range("I" & i), tableau, 2, False)
'''
Ne peux-tu pas reprendre ton premier fichier Test que tu avais posté, et y coller ta nouvelle BDD et ton nouveau tableau de correspondance ?
Cela permettrait de voir ce qui cloche....
Car sans voir comment sont structurées tes données, difficile de t'aider.
Mon dernier fichier (EOK18-bouton.xlsm) fonctionne bien comme tu le souhaites chez toi ?
Cordialement,
Voilà ma base de données modifiée ! mais c'est le principe
En espérant que vous trouverez mon erreur
Merci encore
Cordialement,
Re,
Pfff!!! Si je m'attendais à ça !
Ça va te demander un boulot considérable pour tout vérifier,
Dans ton tableau de correspondance, tu as du texte, pour comparer avec des valeurs numériques, ça ne va pas être possible.
(De plus toutes tes variables sont déclarées en Integer).
Ton tableau de correspondance n'est pas complet, beaucoup de cellules vides, elles seront donc considérées comme valeurs nulles.
J'ai rajouter on "error resume next" pour ignorer l'erreur et fait l'essai sur H2O, MG, VitC et NO3 sur les deux premiers Noms, ça semble correct.
Je ne sais pas comment tu fais pour t'y retrouver, ça m'a filé un de ces maux de tête
Je ne sais pas si il y a moyen de simplifier tout ça....mais en tout cas, je te souhaite bien du courage.
Cordialement,
Merci bien je vais creuser tout ça alors
Je n'arrive pas à ouvrir votre fichier par contre ... est ce normal ?
Bonne fin de journée
Cordialement,
Re,
Je n'arrive pas à ouvrir votre fichier par contre ... est ce normal ?
Non, ce n'est pas normal, je crois que tu es sous MAC, j'ai bien peur que l'instruction "on error resume next" soit la cause du souci,
Un essai à tout hasard...
Bonne soirée et bon courage pour la suite,
Non je n'arrive plus du tout à ouvrir votre fichier... étrange !
Merci pour toute votre aide !!
Cordialement,
Re,
Non je n'arrive plus du tout à ouvrir votre fichier... étrange !
Je n'ai pourtant rajouter que 2 lignes de code pour ignorer l'erreur générée....
On Error Resume Next 'après While i <= derlig
On Error GoTo 0 ' après end If
Désolé de ne pouvoir t'aider d'avantage, un autre membre aura peut-etre une solution viable à te proposer,
Cordialement,
[Spoiler]
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long, derlig As Long
Dim minH2O As Integer, maxH2O As Integer
Dim minprop As Integer, maxprop As Integer
Dim minpropchine As Integer, maxpropchine As Integer
Dim minNO3 As Integer, maxNO3 As Integer
Dim minNO2 As Integer, maxNO2 As Integer
Dim minNaNO2 As Integer, maxNaNO2 As Integer
Dim minMG As Integer, maxMG As Integer
Dim minMGLMG As Integer, maxMGLMG As Integer
Dim minMAT As Integer, maxMAT As Integer
Dim minMATESD As Integer, maxMATESD As Integer
Dim minpH As Integer, maxpH As Integer
Dim mincendres As Integer, maxcendres As Integer
Dim mindensitt As Integer, maxdensitt As Integer
Dim mindensitap As Integer, maxdensitap As Integer
Dim minmouill20 As Integer, maxmouill20 As Integer
Dim minmouill40 As Integer, maxmouill40 As Integer
Dim minmouill60 As Integer, maxmouill60 As Integer
Dim minVitC As Integer, maxVitC As Integer
Dim minsolub As Integer, maxsolub As Integer
Dim mininsolub As Integer, maxinsolub As Integer
Dim minLCHA As Integer, maxLCHA As Integer
Dim minADMI As Integer, maxADMI As Integer
Dim minAcidT As Integer, maxAcidT As Integer
Dim mindisp As Integer, maxdisp As Integer
Dim minbeck As Integer, maxbeck As Integer
Dim mindisp20 As Integer, maxdisp20 As Integer
Dim mindisp60 As Integer, maxdisp60 As Integer
Dim mingranu1 As Integer, maxgranu1 As Integer
Dim mingranu315 As Integer, maxgranu315 As Integer
Dim mingranu400 As Integer, maxgranu400 As Integer
Dim mingranu500 As Integer, maxgranu500 As Integer
Dim mingranu630 As Integer, maxgranu630 As Integer
Dim mingranu850 As Integer, maxgranu850 As Integer
Dim mingranufond As Integer, maxgranufond As Integer
Dim minantibio As Integer, maxantibio As Integer
Dim minglucides As Integer, maxglucides As Integer
Dim minorgano As Integer, maxorgano As Integer
Dim mincafe As Integer, maxcafe As Integer
Dim minlactate As Integer, maxlactate As Integer
Dim minlactose As Integer, maxlactose As Integer
Dim minlipase As Integer, maxlipase As Integer
Dim minWPN As Integer, maxWPN As Integer
Dim minbiberon As Integer, maxbiberon As Integer
Dim mincoli As Integer, maxcoli As Integer
Dim mincoli1 As Integer, maxcoli1 As Integer
Dim mincoli2 As Integer, maxcoli2 As Integer
Dim mincoli3 As Integer, maxcoli3 As Integer
Dim mincoli4 As Integer, maxcoli4 As Integer
Dim mincoli5 As Integer, maxcoli5 As Integer
Dim minecoli As Integer, maxecoli As Integer
Dim minASR37 As Integer, maxASR37 As Integer
Dim minASR46 As Integer, maxASR46 As Integer
Dim minASR46ext As Integer, maxASR46ext As Integer
Dim minperfr37 As Integer, maxperfr37 As Integer
Dim minperfr46 As Integer, maxperfr46 As Integer
Dim minflore As Integer, maxflore As Integer
Dim minflore1 As Integer, maxflore1 As Integer
Dim minflore2 As Integer, maxflore2 As Integer
Dim minflore3 As Integer, maxflore3 As Integer
Dim minflore4 As Integer, maxflore4 As Integer
Dim minflore5 As Integer, maxflore5 As Integer
Dim minlevures As Integer, maxlevures As Integer
Dim minmoisissures As Integer, maxmoisissures As Integer
Dim minLM As Integer, maxLM As Integer
Dim minstrept As Integer, maxstrept As Integer
Dim minstaph As Integer, maxstaph As Integer
Dim minstaph1 As Integer, maxstaph1 As Integer
Dim minstaph2 As Integer, maxstaph2 As Integer
Dim minstaph3 As Integer, maxstaph3 As Integer
Dim minstaph4 As Integer, maxstaph4 As Integer
Dim minstaph5 As Integer, maxstaph5 As Integer
Dim minbacillus As Integer, maxbacillus As Integer
Dim minentero5x10 As Integer, maxentero5x10 As Integer
Dim minentero10x10 As Integer, maxentero10x10 As Integer
Dim minentero As Integer, maxentero As Integer
Dim minenteropos As Integer, maxenteropos As Integer
Dim mincrono25 As Integer, maxcrono25 As Integer
Dim mincrono10x30 As Integer, maxcrono10x30 As Integer
Dim mincrono3x100 As Integer, maxcrono3x100 As Integer
Dim minsalmo251 As Integer, maxsalmo251 As Integer
Dim minsalmo252 As Integer, maxsalmo252 As Integer
Dim minsalmo253 As Integer, maxsalmo253 As Integer
Dim minsalmo254 As Integer, maxsalmo254 As Integer
Dim minsalmo255 As Integer, maxsalmo255 As Integer
Dim minsalmo5x25 As Integer, maxsalmo5x25 As Integer
Dim minsalmo30x25 As Integer, maxsalmo30x25 As Integer
Dim minsalmo30 As Integer, maxsalmo30 As Integer
Dim minsalmo125 As Integer, maxsalmo125 As Integer
Dim minsalmo4x125 As Integer, maxsalmo4x125 As Integer
Dim minsalmo250 As Integer, maxsalmo250 As Integer
Dim minlisteria25 As Integer, maxlisteria25 As Integer
Dim minlisteria10x25 As Integer, maxlisteria10x25 As Integer
Dim minsporemeso As Integer, maxsporemeso As Integer
Dim minsporethermo As Integer, maxsporethermo As Integer
Dim minsporethermo1 As Integer, maxsporethermo1 As Integer
Dim minsporethermoder As Integer, maxsporethermoder As Integer
Dim minpatho As Integer, maxpatho As Integer
Dim minsulfo As Integer, maxsulfo As Integer
Dim minchlo As Integer, maxchlo As Integer
Dim minpenic As Integer, maxpenic As Integer
Dim minchlorine As Integer, maxchlorine As Integer
Dim minaflatoxine As Integer, maxaflatoxine As Integer
Dim minmelamine As Integer, maxmelamine As Integer
Dim mindioxine As Integer, maxdioxine As Integer
Dim minPb As Integer, maxPb As Integer
Dim minCd As Integer, maxCd As Integer
Dim minHg As Integer, maxHg As Integer
Dim minAs As Integer, maxAs As Integer
Dim minCr As Integer, maxCr As Integer
Dim minSb As Integer, maxSb As Integer
Dim minSn As Integer, maxSn As Integer
Dim tableau As Range
derlig = Range("I" & Rows.Count).End(xlUp).Row
Set tableau = Sheets("BDD-CDC").ListObjects("Tableau1").DataBodyRange
Application.ScreenUpdating = False
i = 6
While i <= derlig
On Error Resume Next
minH2O = WorksheetFunction.VLookup(Range("I" & i), tableau, 2, False)
maxH2O = WorksheetFunction.VLookup(Range("I" & i), tableau, 3, False)
minprop = WorksheetFunction.VLookup(Range("I" & i), tableau, 4, False)
maxprop = WorksheetFunction.VLookup(Range("I" & i), tableau, 5, False)
minpropchine = WorksheetFunction.VLookup(Range("I" & i), tableau, 6, False)
maxpropchine = WorksheetFunction.VLookup(Range("I" & i), tableau, 7, False)
minNO3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 8, False)
maxNO3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 9, False)
minNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 10, False)
maxNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 11, False)
minNaNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 12, False)
maxNaNO2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 13, False)
minMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 14, False)
maxMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 15, False)
minMGLMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 16, False)
maxMGLMG = WorksheetFunction.VLookup(Range("I" & i), tableau, 17, False)
minMAT = WorksheetFunction.VLookup(Range("I" & i), tableau, 18, False)
maxMAT = WorksheetFunction.VLookup(Range("I" & i), tableau, 19, False)
minMATESD = WorksheetFunction.VLookup(Range("I" & i), tableau, 20, False)
maxMATESD = WorksheetFunction.VLookup(Range("I" & i), tableau, 21, False)
minpH = WorksheetFunction.VLookup(Range("I" & i), tableau, 22, False)
maxpH = WorksheetFunction.VLookup(Range("I" & i), tableau, 23, False)
mincendres = WorksheetFunction.VLookup(Range("I" & i), tableau, 24, False)
maxcendres = WorksheetFunction.VLookup(Range("I" & i), tableau, 25, False)
mindensitt = WorksheetFunction.VLookup(Range("I" & i), tableau, 26, False)
maxdensitt = WorksheetFunction.VLookup(Range("I" & i), tableau, 27, False)
mindensitap = WorksheetFunction.VLookup(Range("I" & i), tableau, 28, False)
maxdensitap = WorksheetFunction.VLookup(Range("I" & i), tableau, 29, False)
minmouill20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 30, False)
maxmouill20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 31, False)
minmouill40 = WorksheetFunction.VLookup(Range("I" & i), tableau, 32, False)
maxmouill40 = WorksheetFunction.VLookup(Range("I" & i), tableau, 33, False)
minmouill60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 34, False)
maxmouill60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 35, False)
minVitC = WorksheetFunction.VLookup(Range("I" & i), tableau, 36, False)
maxVitC = WorksheetFunction.VLookup(Range("I" & i), tableau, 37, False)
minsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 38, False)
maxsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 39, False)
mininsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 40, False)
maxinsolub = WorksheetFunction.VLookup(Range("I" & i), tableau, 41, False)
minLCHA = WorksheetFunction.VLookup(Range("I" & i), tableau, 42, False)
maxLCHA = WorksheetFunction.VLookup(Range("I" & i), tableau, 43, False)
minADMI = WorksheetFunction.VLookup(Range("I" & i), tableau, 44, False)
maxADMI = WorksheetFunction.VLookup(Range("I" & i), tableau, 45, False)
minAcidT = WorksheetFunction.VLookup(Range("I" & i), tableau, 46, False)
maxAcidT = WorksheetFunction.VLookup(Range("I" & i), tableau, 47, False)
mindisp = WorksheetFunction.VLookup(Range("I" & i), tableau, 48, False)
maxdisp = WorksheetFunction.VLookup(Range("I" & i), tableau, 49, False)
minbeck = WorksheetFunction.VLookup(Range("I" & i), tableau, 50, False)
maxbeck = WorksheetFunction.VLookup(Range("I" & i), tableau, 51, False)
mindisp20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 52, False)
maxdisp20 = WorksheetFunction.VLookup(Range("I" & i), tableau, 53, False)
mindisp60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 54, False)
maxdisp60 = WorksheetFunction.VLookup(Range("I" & i), tableau, 55, False)
mingranu1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 56, False)
maxgranu1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 57, False)
mingranu315 = WorksheetFunction.VLookup(Range("I" & i), tableau, 58, False)
maxgranu315 = WorksheetFunction.VLookup(Range("I" & i), tableau, 59, False)
mingranu400 = WorksheetFunction.VLookup(Range("I" & i), tableau, 60, False)
maxgranu400 = WorksheetFunction.VLookup(Range("I" & i), tableau, 61, False)
mingranu500 = WorksheetFunction.VLookup(Range("I" & i), tableau, 62, False)
maxgranu500 = WorksheetFunction.VLookup(Range("I" & i), tableau, 62, False)
mingranu630 = WorksheetFunction.VLookup(Range("I" & i), tableau, 63, False)
maxgranu630 = WorksheetFunction.VLookup(Range("I" & i), tableau, 64, False)
mingranu850 = WorksheetFunction.VLookup(Range("I" & i), tableau, 65, False)
maxgranu850 = WorksheetFunction.VLookup(Range("I" & i), tableau, 66, False)
mingranufond = WorksheetFunction.VLookup(Range("I" & i), tableau, 67, False)
maxgranufond = WorksheetFunction.VLookup(Range("I" & i), tableau, 68, False)
minantibio = WorksheetFunction.VLookup(Range("I" & i), tableau, 69, False)
maxantibio = WorksheetFunction.VLookup(Range("I" & i), tableau, 70, False)
minglucides = WorksheetFunction.VLookup(Range("I" & i), tableau, 71, False)
maxglucides = WorksheetFunction.VLookup(Range("I" & i), tableau, 72, False)
minorgano = WorksheetFunction.VLookup(Range("I" & i), tableau, 73, False)
maxorgano = WorksheetFunction.VLookup(Range("I" & i), tableau, 74, False)
mincafe = WorksheetFunction.VLookup(Range("I" & i), tableau, 75, False)
maxcafe = WorksheetFunction.VLookup(Range("I" & i), tableau, 76, False)
minlactate = WorksheetFunction.VLookup(Range("I" & i), tableau, 77, False)
maxlactate = WorksheetFunction.VLookup(Range("I" & i), tableau, 78, False)
minlactose = WorksheetFunction.VLookup(Range("I" & i), tableau, 79, False)
maxlactose = WorksheetFunction.VLookup(Range("I" & i), tableau, 80, False)
minlipase = WorksheetFunction.VLookup(Range("I" & i), tableau, 81, False)
maxlipase = WorksheetFunction.VLookup(Range("I" & i), tableau, 82, False)
minWPN = WorksheetFunction.VLookup(Range("I" & i), tableau, 83, False)
maxWPN = WorksheetFunction.VLookup(Range("I" & i), tableau, 84, False)
minbiberon = WorksheetFunction.VLookup(Range("I" & i), tableau, 85, False)
maxbiberon = WorksheetFunction.VLookup(Range("I" & i), tableau, 86, False)
mincoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 87, False)
maxcoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 88, False)
mincoli1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 89, False)
maxcoli1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 90, False)
mincoli2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 91, False)
maxcoli2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 92, False)
mincoli3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 93, False)
maxcoli3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 94, False)
mincoli4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 95, False)
maxcoli4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 96, False)
mincoli5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 97, False)
maxcoli5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 98, False)
minecoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 99, False)
maxecoli = WorksheetFunction.VLookup(Range("I" & i), tableau, 100, False)
minASR37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 101, False)
maxASR37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 102, False)
minASR46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 103, False)
maxASR46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 104, False)
minASR46ext = WorksheetFunction.VLookup(Range("I" & i), tableau, 105, False)
maxASR46ext = WorksheetFunction.VLookup(Range("I" & i), tableau, 106, False)
minperfr37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 107, False)
maxperfr37 = WorksheetFunction.VLookup(Range("I" & i), tableau, 108, False)
minperfr46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 109, False)
maxperfr46 = WorksheetFunction.VLookup(Range("I" & i), tableau, 110, False)
minflore = WorksheetFunction.VLookup(Range("I" & i), tableau, 111, False)
maxflore = WorksheetFunction.VLookup(Range("I" & i), tableau, 112, False)
minflore1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 113, False)
maxflore1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 114, False)
minflore2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 115, False)
maxflore2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 116, False)
minflore3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 117, False)
maxflore3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 118, False)
minflore4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 119, False)
maxflore4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 120, False)
minflore5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 121, False)
maxflore5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 122, False)
minlevures = WorksheetFunction.VLookup(Range("I" & i), tableau, 123, False)
maxlevures = WorksheetFunction.VLookup(Range("I" & i), tableau, 124, False)
minmoisissures = WorksheetFunction.VLookup(Range("I" & i), tableau, 125, False)
maxmoisissures = WorksheetFunction.VLookup(Range("I" & i), tableau, 126, False)
minLM = WorksheetFunction.VLookup(Range("I" & i), tableau, 127, False)
maxLM = WorksheetFunction.VLookup(Range("I" & i), tableau, 128, False)
minstrept = WorksheetFunction.VLookup(Range("I" & i), tableau, 129, False)
maxstrept = WorksheetFunction.VLookup(Range("I" & i), tableau, 130, False)
minstaph = WorksheetFunction.VLookup(Range("I" & i), tableau, 131, False)
maxstaph = WorksheetFunction.VLookup(Range("I" & i), tableau, 132, False)
minstaph1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 133, False)
maxstaph1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 134, False)
minstaph2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 135, False)
maxstaph2 = WorksheetFunction.VLookup(Range("I" & i), tableau, 136, False)
minstaph3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 137, False)
maxstaph3 = WorksheetFunction.VLookup(Range("I" & i), tableau, 138, False)
minstaph4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 139, False)
maxstaph4 = WorksheetFunction.VLookup(Range("I" & i), tableau, 140, False)
minstaph5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 141, False)
maxstaph5 = WorksheetFunction.VLookup(Range("I" & i), tableau, 142, False)
minbacillus = WorksheetFunction.VLookup(Range("I" & i), tableau, 143, False)
maxbacillus = WorksheetFunction.VLookup(Range("I" & i), tableau, 144, False)
minentero5x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 145, False)
maxentero5x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 146, False)
minentero10x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 147, False)
maxentero10x10 = WorksheetFunction.VLookup(Range("I" & i), tableau, 148, False)
minentero = WorksheetFunction.VLookup(Range("I" & i), tableau, 149, False)
maxentero = WorksheetFunction.VLookup(Range("I" & i), tableau, 150, False)
minenteropos = WorksheetFunction.VLookup(Range("I" & i), tableau, 151, False)
maxenteropos = WorksheetFunction.VLookup(Range("I" & i), tableau, 152, False)
mincrono25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 153, False)
maxcrono25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 154, False)
mincrono10x30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 155, False)
maxcrono10x30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 156, False)
mincrono3x100 = WorksheetFunction.VLookup(Range("I" & i), tableau, 157, False)
maxcrono3x100 = WorksheetFunction.VLookup(Range("I" & i), tableau, 158, False)
minsalmo251 = WorksheetFunction.VLookup(Range("I" & i), tableau, 159, False)
maxsalmo251 = WorksheetFunction.VLookup(Range("I" & i), tableau, 160, False)
minsalmo252 = WorksheetFunction.VLookup(Range("I" & i), tableau, 161, False)
maxsalmo252 = WorksheetFunction.VLookup(Range("I" & i), tableau, 162, False)
minsalmo253 = WorksheetFunction.VLookup(Range("I" & i), tableau, 163, False)
maxsalmo253 = WorksheetFunction.VLookup(Range("I" & i), tableau, 164, False)
minsalmo254 = WorksheetFunction.VLookup(Range("I" & i), tableau, 165, False)
maxsalmo254 = WorksheetFunction.VLookup(Range("I" & i), tableau, 166, False)
minsalmo255 = WorksheetFunction.VLookup(Range("I" & i), tableau, 167, False)
maxsalmo255 = WorksheetFunction.VLookup(Range("I" & i), tableau, 168, False)
minsalmo5x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 169, False)
maxsalmo5x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 170, False)
minsalmo30x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 171, False)
maxsalmo30x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 172, False)
minsalmo30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 173, False)
maxsalmo30 = WorksheetFunction.VLookup(Range("I" & i), tableau, 174, False)
minsalmo125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 175, False)
maxsalmo125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 176, False)
minsalmo4x125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 177, False)
maxsalmo4x125 = WorksheetFunction.VLookup(Range("I" & i), tableau, 178, False)
minsalmo250 = WorksheetFunction.VLookup(Range("I" & i), tableau, 179, False)
maxsalmo250 = WorksheetFunction.VLookup(Range("I" & i), tableau, 180, False)
minlisteria25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 181, False)
maxlisteria25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 182, False)
minlisteria10x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 183, False)
maxlisteria10x25 = WorksheetFunction.VLookup(Range("I" & i), tableau, 184, False)
minsporemeso = WorksheetFunction.VLookup(Range("I" & i), tableau, 185, False)
maxsporemeso = WorksheetFunction.VLookup(Range("I" & i), tableau, 186, False)
minsporethermo = WorksheetFunction.VLookup(Range("I" & i), tableau, 187, False)
maxsporethermo = WorksheetFunction.VLookup(Range("I" & i), tableau, 188, False)
minsporethermo1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 189, False)
maxsporethermo1 = WorksheetFunction.VLookup(Range("I" & i), tableau, 190, False)
minsporethermoder = WorksheetFunction.VLookup(Range("I" & i), tableau, 191, False)
maxsporethermoder = WorksheetFunction.VLookup(Range("I" & i), tableau, 192, False)
minpatho = WorksheetFunction.VLookup(Range("I" & i), tableau, 193, False)
maxpatho = WorksheetFunction.VLookup(Range("I" & i), tableau, 194, False)
minsulfo = WorksheetFunction.VLookup(Range("I" & i), tableau, 195, False)
maxsulfo = WorksheetFunction.VLookup(Range("I" & i), tableau, 196, False)
minchlo = WorksheetFunction.VLookup(Range("I" & i), tableau, 197, False)
maxchlo = WorksheetFunction.VLookup(Range("I" & i), tableau, 198, False)
minpenic = WorksheetFunction.VLookup(Range("I" & i), tableau, 199, False)
maxpenic = WorksheetFunction.VLookup(Range("I" & i), tableau, 200, False)
minchlorine = WorksheetFunction.VLookup(Range("I" & i), tableau, 201, False)
maxchlorine = WorksheetFunction.VLookup(Range("I" & i), tableau, 202, False)
minaflatoxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 203, False)
maxaflatoxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 204, False)
minmelamine = WorksheetFunction.VLookup(Range("I" & i), tableau, 205, False)
maxmelamine = WorksheetFunction.VLookup(Range("I" & i), tableau, 206, False)
mindioxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 207, False)
maxdioxine = WorksheetFunction.VLookup(Range("I" & i), tableau, 208, False)
minPb = WorksheetFunction.VLookup(Range("I" & i), tableau, 209, False)
maxPb = WorksheetFunction.VLookup(Range("I" & i), tableau, 210, False)
minCd = WorksheetFunction.VLookup(Range("I" & i), tableau, 211, False)
maxCd = WorksheetFunction.VLookup(Range("I" & i), tableau, 212, False)
minHg = WorksheetFunction.VLookup(Range("I" & i), tableau, 213, False)
maxHg = WorksheetFunction.VLookup(Range("I" & i), tableau, 214, False)
minAs = WorksheetFunction.VLookup(Range("I" & i), tableau, 215, False)
maxAs = WorksheetFunction.VLookup(Range("I" & i), tableau, 216, False)
minCr = WorksheetFunction.VLookup(Range("I" & i), tableau, 217, False)
maxCr = WorksheetFunction.VLookup(Range("I" & i), tableau, 218, False)
minSb = WorksheetFunction.VLookup(Range("I" & i), tableau, 219, False)
maxSb = WorksheetFunction.VLookup(Range("I" & i), tableau, 220, False)
minSn = WorksheetFunction.VLookup(Range("I" & i), tableau, 221, False)
maxSn = WorksheetFunction.VLookup(Range("I" & i), tableau, 222, False)
If Range("AE" & i) < minH2O Or Range("AE" & i) > maxH2O Then
Range("AE" & i).Font.Color = vbRed
Else
Range("AE" & i).Font.Color = vbBlack
End If
If Range("DK" & i) < minNO3 Or Range("DK" & i) > maxNO3 Then
Range("DK" & i).Font.Color = vbRed
Else
Range("DK" & i).Font.Color = vbBlack
End If
If Range("DM" & i) < minNO2 Or Range("DM" & i) > maxNO2 Then
Range("DM" & i).Font.Color = vbRed
Else
Range("DM" & i).Font.Color = vbBlack
End If
If Range("AM" & i) < minMG Or Range("AM" & i) > maxMG Then
Range("AM" & i).Font.Color = vbRed
Else
Range("AM" & i).Font.Color = vbBlack
End If
If Range("BG" & i) < minMGLMG Or Range("BG" & i) > maxMGLMG Then
Range("BG" & i).Font.Color = vbRed
Else
Range("BG" & i).Font.Color = vbBlack
End If
If Range("AU" & i) < minpH Or Range("AU" & i) > maxpH Then
Range("AU" & i).Font.Color = vbRed
Else
Range("AU" & i).Font.Color = vbBlack
End If
If Range("DO" & i) < mincendres Or Range("DO" & i) > maxcendres Then
Range("DO" & i).Font.Color = vbRed
Else
Range("DO" & i).Font.Color = vbBlack
End If
If Range("AI" & i) < mindensitt Or Range("AI" & i) > maxdensitt Then
Range("AI" & i).Font.Color = vbRed
Else
Range("AI" & i).Font.Color = vbBlack
End If
If Range("AK" & i) < mindensitap Or Range("AK" & i) > maxdensitap Then
Range("AK" & i).Font.Color = vbRed
Else
Range("AK" & i).Font.Color = vbBlack
End If
If Range("BY" & i) < minmouill20 Or Range("BY" & i) > maxmouill20 Then
Range("BY" & i).Font.Color = vbRed
Else
Range("BY" & i).Font.Color = vbBlack
End If
If Range("CA" & i) < minmouill40 Or Range("CA" & i) > maxmouill40 Then
Range("CA" & i).Font.Color = vbRed
Else
Range("CA" & i).Font.Color = vbBlack
End If
If Range("CC" & i) < minmouill60 Or Range("CC" & i) > maxmouill60 Then
Range("CC" & i).Font.Color = vbRed
Else
Range("CC" & i).Font.Color = vbBlack
End If
If Range("AO" & i) < minVitC Or Range("AO" & i) > maxVitC Then
Range("AO" & i).Font.Color = vbRed
Else
Range("AO" & i).Font.Color = vbBlack
End If
If Range("AS" & i) < minsolub Or Range("AS" & i) > maxsolub Then
Range("AS" & i).Font.Color = vbRed
Else
Range("AS" & i).Font.Color = vbBlack
End If
If Range("AQ" & i) < mininsolub Or Range("AQ" & i) > maxinsolub Then
Range("AQ" & i).Font.Color = vbRed
Else
Range("AQ" & i).Font.Color = vbBlack
End If
If Range("CE" & i) < minLCHA Or Range("CE" & i) > maxLCHA Then
Range("CE" & i).Font.Color = vbRed
Else
Range("CE" & i).Font.Color = vbBlack
End If
If Range("CG" & i) < minADMI Or Range("CG" & i) > maxADMI Then
Range("CG" & i).Font.Color = vbRed
Else
Range("CG" & i).Font.Color = vbBlack
End If
If Range("CI" & i) < minAcidT Or Range("CI" & i) > maxAcidT Then
Range("CI" & i).Font.Color = vbRed
Else
Range("CI" & i).Font.Color = vbBlack
End If
If Range("BU" & i) < mindisp Or Range("BU" & i) > maxdisp Then
Range("BU" & i).Font.Color = vbRed
Else
Range("BU" & i).Font.Color = vbBlack
End If
If Range("BS" & i) < minbeck Or Range("BS" & i) > maxbeck Then
Range("BS" & i).Font.Color = vbRed
Else
Range("BS" & i).Font.Color = vbBlack
End If
If Range("BO" & i) < mindisp20 Or Range("BO" & i) > maxdisp20 Then
Range("BO" & i).Font.Color = vbRed
Else
Range("BO" & i).Font.Color = vbBlack
End If
If Range("BQ" & i) < mindisp60 Or Range("BQ" & i) > maxdisp60 Then
Range("BQ" & i).Font.Color = vbRed
Else
Range("BQ" & i).Font.Color = vbBlack
End If
If Range("CU" & i) < mingranu1 Or Range("CU" & i) > maxgranu1 Then
Range("CU" & i).Font.Color = vbRed
Else
Range("CU" & i).Font.Color = vbBlack
End If
If Range("CW" & i) < mingranu315 Or Range("CW" & i) > maxgranu315 Then
Range("CW" & i).Font.Color = vbRed
Else
Range("CW" & i).Font.Color = vbBlack
End If
If Range("CY" & i) < mingranu400 Or Range("CY" & i) > maxgranu400 Then
Range("CY" & i).Font.Color = vbRed
Else
Range("CY" & i).Font.Color = vbBlack
End If
If Range("DA" & i) < mingranu500 Or Range("DA" & i) > maxgranu500 Then
Range("DA" & i).Font.Color = vbRed
Else
Range("DA" & i).Font.Color = vbBlack
End If
If Range("DC" & i) < mingranu630 Or Range("DC" & i) > maxgranu630 Then
Range("DC" & i).Font.Color = vbRed
Else
Range("DC" & i).Font.Color = vbBlack
End If
If Range("DE" & i) < mingranu850 Or Range("DE" & i) > maxgranu850 Then
Range("DE" & i).Font.Color = vbRed
Else
Range("DE" & i).Font.Color = vbBlack
End If
If Range("DG" & i) < mingranufond Or Range("DG" & i) > maxgranufond Then
Range("DG" & i).Font.Color = vbRed
Else
Range("DG" & i).Font.Color = vbBlack
End If
If Range("DU" & i) < minantibio Or Range("DU" & i) > maxantibio Then
Range("DU" & i).Font.Color = vbRed
Else
Range("DU" & i).Font.Color = vbBlack
End If
If Range("CQ" & i) < mincafe Or Range("CQ" & i) > maxcafe Then
Range("CQ" & i).Font.Color = vbRed
Else
Range("CQ" & i).Font.Color = vbBlack
End If
If Range("BW" & i) < minlactate Or Range("BW" & i) > maxlactate Then
Range("BW" & i).Font.Color = vbRed
Else
Range("BW" & i).Font.Color = vbBlack
End If
If Range("DM" & i) < minlactose Or Range("DM" & i) > maxlactose Then
Range("DM" & i).Font.Color = vbRed
Else
Range("DM" & i).Font.Color = vbBlack
End If
If Range("DQ" & i) < minlipase Or Range("DQ" & i) > maxlipase Then
Range("DQ" & i).Font.Color = vbRed
Else
Range("DQ" & i).Font.Color = vbBlack
End If
If Range("BC" & i) < minWPN Or Range("BC" & i) > maxWPN Then
Range("BC" & i).Font.Color = vbRed
Else
Range("BC" & i).Font.Color = vbBlack
End If
If Range("CS" & i) < minbiberon Or Range("CS" & i) > maxbiberon Then
Range("CS" & i).Font.Color = vbRed
Else
Range("CS" & i).Font.Color = vbBlack
End If
If Range("DW" & i) < mincoli Or Range("DW" & i) > maxcoli Then
Range("DW" & i).Font.Color = vbRed
Else
Range("DW" & i).Font.Color = vbBlack
End If
If Range("DY" & i) < mincoli1 Or Range("DY" & i) > maxcoli1 Then
Range("DY" & i).Font.Color = vbRed
Else
Range("DY" & i).Font.Color = vbBlack
End If
If Range("EA" & i) < mincoli2 Or Range("EA" & i) > maxcoli2 Then
Range("EA" & i).Font.Color = vbRed
Else
Range("EA" & i).Font.Color = vbBlack
End If
If Range("EC" & i) < mincoli3 Or Range("EC" & i) > maxcoli3 Then
Range("EC" & i).Font.Color = vbRed
Else
Range("EC" & i).Font.Color = vbBlack
End If
If Range("EE" & i) < mincoli4 Or Range("EE" & i) > maxcoli4 Then
Range("EE" & i).Font.Color = vbRed
Else
Range("EE" & i).Font.Color = vbBlack
End If
If Range("EG" & i) < mincoli5 Or Range("EG" & i) > maxcoli5 Then
Range("EG" & i).Font.Color = vbRed
Else
Range("EG" & i).Font.Color = vbBlack
End If
If Range("HO" & i) < minecoli Or Range("HO" & i) > maxecoli Then
Range("HO" & i).Font.Color = vbRed
Else
Range("HO" & i).Font.Color = vbBlack
End If
If Range("EI" & i) < minASR37 Or Range("EI" & i) > maxASR37 Then
Range("EI" & i).Font.Color = vbRed
Else
Range("EI" & i).Font.Color = vbBlack
End If
If Range("EK" & i) < minASR46 Or Range("EK" & i) > maxASR46 Then
Range("EK" & i).Font.Color = vbRed
Else
Range("EK" & i).Font.Color = vbBlack
End If
If Range("EM" & i) < minASR46ext Or Range("EM" & i) > maxASR46ext Then
Range("EM" & i).Font.Color = vbRed
Else
Range("EM" & i).Font.Color = vbBlack
End If
If Range("EO" & i) < minperfr37 Or Range("EO" & i) > maxperfr37 Then
Range("EO" & i).Font.Color = vbRed
Else
Range("EO" & i).Font.Color = vbBlack
End If
If Range("EQ" & i) < minperfr46 Or Range("EQ" & i) > maxperfr46 Then
Range("EQ" & i).Font.Color = vbRed
Else
Range("EQ" & i).Font.Color = vbBlack
End If
If Range("ES" & i) < minflore Or Range("ES" & i) > maxflore Then
Range("ES" & i).Font.Color = vbRed
Else
Range("ES" & i).Font.Color = vbBlack
End If
If Range("EU" & i) < minflore1 Or Range("EU" & i) > maxflore1 Then
Range("EU" & i).Font.Color = vbRed
Else
Range("EU" & i).Font.Color = vbBlack
End If
If Range("EW" & i) < minflore2 Or Range("EW" & i) > maxflore2 Then
Range("EW" & i).Font.Color = vbRed
Else
Range("EW" & i).Font.Color = vbBlack
End If
If Range("EY" & i) < minflore3 Or Range("EY" & i) > maxflore3 Then
Range("EY" & i).Font.Color = vbRed
Else
Range("EY" & i).Font.Color = vbBlack
End If
If Range("FA" & i) < minflore4 Or Range("FA" & i) > maxflore4 Then
Range("FA" & i).Font.Color = vbRed
Else
Range("FA" & i).Font.Color = vbBlack
End If
If Range("FC" & i) < minflore5 Or Range("FC" & i) > maxflore5 Then
Range("FC" & i).Font.Color = vbRed
Else
Range("FC" & i).Font.Color = vbBlack
End If
If Range("FE" & i) < minlevures Or Range("FE" & i) > maxlevures Then
Range("FE" & i).Font.Color = vbRed
Else
Range("FE" & i).Font.Color = vbBlack
End If
If Range("FG" & i) < minmoisissures Or Range("FG" & i) > maxmoisissures Then
Range("FG" & i).Font.Color = vbRed
Else
Range("FG" & i).Font.Color = vbBlack
End If
If Range("FI" & i) < minLM Or Range("FI" & i) > maxLM Then
Range("FI" & i).Font.Color = vbRed
Else
Range("FI" & i).Font.Color = vbBlack
End If
If Range("FK" & i) < minstrept Or Range("FK" & i) > maxstrept Then
Range("FK" & i).Font.Color = vbRed
Else
Range("FK" & i).Font.Color = vbBlack
End If
If Range("FM" & i) < minstaph Or Range("FM" & i) > maxstaph Then
Range("FM" & i).Font.Color = vbRed
Else
Range("FM" & i).Font.Color = vbBlack
End If
If Range("FO" & i) < minstaph1 Or Range("FO" & i) > maxstaph1 Then
Range("FO" & i).Font.Color = vbRed
Else
Range("FO" & i).Font.Color = vbBlack
End If
If Range("FQ" & i) < minstaph2 Or Range("FQ" & i) > maxstaph2 Then
Range("FQ" & i).Font.Color = vbRed
Else
Range("FQ" & i).Font.Color = vbBlack
End If
If Range("FS" & i) < minstaph3 Or Range("FS" & i) > maxstaph3 Then
Range("FS" & i).Font.Color = vbRed
Else
Range("FS" & i).Font.Color = vbBlack
End If
If Range("FU" & i) < minstaph4 Or Range("FU" & i) > maxstaph4 Then
Range("FU" & i).Font.Color = vbRed
Else
Range("FU" & i).Font.Color = vbBlack
End If
If Range("FW" & i) < minstaph5 Or Range("FW" & i) > maxstaph5 Then
Range("FW" & i).Font.Color = vbRed
Else
Range("FW" & i).Font.Color = vbBlack
End If
If Range("FY" & i) < minbacillus Or Range("FY" & i) > maxbacillus Then
Range("FY" & i).Font.Color = vbRed
Else
Range("FY" & i).Font.Color = vbBlack
End If
If Range("GC" & i) < minentero5x10 Or Range("GC" & i) > maxentero5x10 Then
Range("GC" & i).Font.Color = vbRed
Else
Range("GC" & i).Font.Color = vbBlack
End If
If Range("GE" & i) < minentero10x10 Or Range("GE" & i) > maxentero10x10 Then
Range("GE" & i).Font.Color = vbRed
Else
Range("GE" & i).Font.Color = vbBlack
End If
If Range("GA" & i) < minentero Or Range("GA" & i) > maxentero Then
Range("GA" & i).Font.Color = vbRed
Else
Range("GA" & i).Font.Color = vbBlack
End If
If Range("GG" & i) < minenteropos Or Range("GG" & i) > maxenteropos Then
Range("GG" & i).Font.Color = vbRed
Else
Range("GG" & i).Font.Color = vbBlack
End If
If Range("GI" & i) < mincrono25 Or Range("GI" & i) > maxcrono25 Then
Range("GI" & i).Font.Color = vbRed
Else
Range("GI" & i).Font.Color = vbBlack
End If
If Range("GK" & i) < mincrono10x30 Or Range("GK" & i) > maxcrono10x30 Then
Range("GK" & i).Font.Color = vbRed
Else
Range("GK" & i).Font.Color = vbBlack
End If
If Range("GM" & i) < mincrono3x100 Or Range("GM" & i) > maxcrono3x100 Then
Range("GM" & i).Font.Color = vbRed
Else
Range("GM" & i).Font.Color = vbBlack
End If
If Range("GS" & i) < minsalmo251 Or Range("GS" & i) > maxsalmo251 Then
Range("GS" & i).Font.Color = vbRed
Else
Range("GS" & i).Font.Color = vbBlack
End If
If Range("GU" & i) < minsalmo252 Or Range("GU" & i) > maxsalmo252 Then
Range("GU" & i).Font.Color = vbRed
Else
Range("GU" & i).Font.Color = vbBlack
End If
If Range("GW" & i) < minsalmo253 Or Range("GW" & i) > maxsalmo253 Then
Range("GW" & i).Font.Color = vbRed
Else
Range("GW" & i).Font.Color = vbBlack
End If
If Range("GY" & i) < minsalmo254 Or Range("GY" & i) > maxsalmo254 Then
Range("GY" & i).Font.Color = vbRed
Else
Range("GY" & i).Font.Color = vbBlack
End If
If Range("HA" & i) < minsalmo255 Or Range("HA" & i) > maxsalmo255 Then
Range("HA" & i).Font.Color = vbRed
Else
Range("HA" & i).Font.Color = vbBlack
End If
If Range("HC" & i) < minsalmo5x25 Or Range("HC" & i) > maxsalmo5x25 Then
Range("HC" & i).Font.Color = vbRed
Else
Range("HC" & i).Font.Color = vbBlack
End If
If Range("HE" & i) < minsalmo30x25 Or Range("HE" & i) > maxsalmo30x25 Then
Range("HE" & i).Font.Color = vbRed
Else
Range("HE" & i).Font.Color = vbBlack
End If
If Range("HG" & i) < minsalmo30 Or Range("HG" & i) > maxsalmo30 Then
Range("HG" & i).Font.Color = vbRed
Else
Range("HG" & i).Font.Color = vbBlack
End If
If Range("HI" & i) < minsalmo125 Or Range("HI" & i) > maxsalmo125 Then
Range("HI" & i).Font.Color = vbRed
Else
Range("HI" & i).Font.Color = vbBlack
End If
If Range("HK" & i) < minsalmo4x125 Or Range("HK" & i) > maxsalmo4x125 Then
Range("HK" & i).Font.Color = vbRed
Else
Range("HK" & i).Font.Color = vbBlack
End If
If Range("HM" & i) < minsalmo250 Or Range("HM" & i) > maxsalmo250 Then
Range("HM" & i).Font.Color = vbRed
Else
Range("HM" & i).Font.Color = vbBlack
End If
If Range("HQ" & i) < minlisteria25 Or Range("HQ" & i) > maxlisteria25 Then
Range("HQ" & i).Font.Color = vbRed
Else
Range("HQ" & i).Font.Color = vbBlack
End If
If Range("HS" & i) < minlisteria10x25 Or Range("HS" & i) > maxlisteria10x25 Then
Range("HS" & i).Font.Color = vbRed
Else
Range("HS" & i).Font.Color = vbBlack
End If
If Range("HX" & i) < minsporemeso Or Range("HX" & i) > maxsporemeso Then
Range("HX" & i).Font.Color = vbRed
Else
Range("HX" & i).Font.Color = vbBlack
End If
If Range("HZ" & i) < minsporethermo Or Range("HZ" & i) > maxsporethermo Then
Range("HZ" & i).Font.Color = vbRed
Else
Range("HZ" & i).Font.Color = vbBlack
End If
If Range("IB" & i) < minsporethermo1 Or Range("IB" & i) > maxsporethermo1 Then
Range("IB" & i).Font.Color = vbRed
Else
Range("IB" & i).Font.Color = vbBlack
End If
If Range("ID" & i) < minsporethermoder Or Range("ID" & i) > maxsporethermoder Then
Range("ID" & i).Font.Color = vbRed
Else
Range("ID" & i).Font.Color = vbBlack
End If
On Error GoTo 0
i = i + 1
Wend
End Sub