If Not Application.Intersect(Target, Range("Exploit_CT_result")) Is Nothing Then
''''affichhage de la sélection pour les différent types de sélection possible puis recherche des info en fonction des puits sélectionnées
'Sheets("Exploitation_QPCR").unprotect ("4862")
'Sheets("listes").unprotect ("4862")
Application.EnableEvents = False
Run "calc_off"
Dim nb_color As Integer
Dim Nb_ligne As Integer
'''selection sur plaque
SelectionSurPlaque:
Range("Exploit_CT_result").Font.Bold = False
'''Ecriture du nom de l'échantillon
With Sheets("Exploitation_QPCR").Range("Exploitation_coords")
Set c = .Find(LCase(Cells(Selection.Row, 1)) & Cells(3, Selection.Column), LookIn:=xlFormulas) ' <<Plate Layout>>
Sheets("listes").Range("Listes_selected_well_name") = Cells(c.Row, Range("Exploitation_sample_name_small_col").Column)
End With
''sélection sur plaque en fonction de l'option choisie
Range("Graph_selected_well") = 0 '''mise à zéro du nombre de série sélectionnées
Range("Exploitation_données_sélection").ClearContents
Range("Exploitation_données_sélection").Interior.ColorIndex = xlNone
info1 = Range("Result_intitulé_1")
info2 = Range("Result_intitulé_2")
Range("Result_intitulé_1") = "Cibles"
Range("Result_intitulé_2") = "SAMPLENAME"
'Run "rafraichissement_plaque"
Range("Exploit_CT_result").FormulaR1C1 = "=Exploit_plate"
Range("Exploit_CT_result") = Range("Exploit_CT_result").Value
Sheets("Exploitation_QPCR").Range("Exploitation_sample_name_selected").ClearContents
Range("Exploitation_listes_primers_in_use").ClearContents
Range("Exploitation_listes_primers_in_use").Interior.ColorIndex = xlNone
I = 0
Select Case Sheets("listes").Range("Listes_affichage_type")
Case "Unique"
Unique: ''retour si sélection unique avec un seul puits
Sheets("listes").Range("listes_nb_serie_en_cours") = 1
Dim Décalage As Integer
Décalage = -1
If Cells(Target.Row, 2) = Cells(Target.Row + 1, 2) Then Décalage = 1
'''mise en gras du puits sélectionné
Target.Font.Bold = True
Target.Offset(Décalage, 0).Font.Bold = True
If Cells(Target.Row, 2) = Cells(Target.Row + 1, 2) Then
Range("Graph_selected_well").Offset(I, -1) = Target
Range("Graph_selected_well").Offset(I, 0) = Target.Offset(Décalage, 0)
Else
Range("Graph_selected_well").Offset(I, -1) = Target.Offset(Décalage, 0)
Range("Graph_selected_well").Offset(I, 0) = Target
End If
'''coloriage primers sélection en utilisation
With Sheets("listes").Range("Listes_col_primer")
Set d = .Find(Target.Offset(Décalage, 0), LookIn:=xlValues)
End With
Range("Graph_selected_well").Offset(I, -1).Interior.ColorIndex = d.Interior.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.ColorIndex = d.Font.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.Bold = d.Font.Bold
Range("Result_intitulé_1") = info1
Range("Result_intitulé_2") = info2
Run "rafraichissement_plaque"
Sheets("listes").Range("Graph_selected_well") = 1
Case "Echantillon"
'''détection des primers de l'échantillon
'''boucle pour afficher les primers dispo
Z = 1
' Echantillon = Target.Offset(-1, 0)
' If Cells(c.Row, 2) = Cells(c.Row - 1, 2) Then Echantillon = Target
For Each c In Sheets("Exploitation_QPCR").Range("Exploit_primer_sample_col")
With Sheets("Exploitation_QPCR").Range("Exploitation_listes_primers_in_use")
Set d = .Find(c, LookIn:=xlValues)
If d Is Nothing And c <> "not found" And c <> 0 Then
' MsgBox Cells(c.Row, Range("Exploitation_sample_name_small_col").Column)
If Cells(c.Row, Range("Exploitation_sample_name_small_col").Column) = Sheets("listes").Range("Listes_selected_well_name") Then
Sheets("Exploitation_QPCR").Range("exploitation_init_primer_selection").Offset(Z, 0) = c
Z = Z + 1
'If z > 25 Then GoTo fin_primer_liste 'pas de limite sur l'instauration du détail
End If
End If
'''mise en gras du/des puits sélectionné(s)
If Cells(c.Row, 2) = Cells(c.Row - 1, 2) Then
Range("Graph_selected_well") = Range("Graph_selected_well") + 1
c.Font.Bold = True
c.Offset(1, 0).Font.Bold = True
Else
Range("Graph_selected_well") = Range("Graph_selected_well") + 1
c.Font.Bold = True
c.Offset(-1, 0).Font.Bold = True
End If
End With
'Sheets("listes").Range("listes_nb_serie_en_cours") = z ''''
Next c
Sheets("listes").Range("listes_nb_serie_en_cours") = Z ''''
fin_primer_liste:
Sheets("Exploitation_QPCR").Range("Exploitation_sample_name_selected").FormulaR1C1 = "=IF(RC[-1]="""","""",Listes!Listes_selected_well_name&""_""&RC[-1])"
Sheets("Exploitation_QPCR").Range("Exploitation_sample_name_selected").Calculate
'''coloriage des primers en utilisation
For Each c In Sheets("Exploitation_QPCR").Range("Exploitation_listes_primers_in_use")
If c = "" Then GoTo fin_couleur_primer
With Sheets("listes").Range("Listes_col_primer")
Set d = .Find(c, LookIn:=xlValues) ' <<Plate Layout>>
End With
c.Interior.ColorIndex = d.Interior.ColorIndex
c.Font.ColorIndex = d.Font.ColorIndex
c.Font.Bold = d.Font.Bold
Next c
fin_couleur_primer:
Case "Sélection"
Z = 0 '''compteur d'item dans selection
'If c.Count = 1 Then GoTo Unique
For Each c In Selection
If c.Font.Bold = True Then GoTo cellsuivante3 '''évite la double utilisation du puits
'If Cells(c.Row, 2) = Cells(c.Row + 1, 2) Then GoTo cellsuivante3
If c = "" Then GoTo cellsuivante3
Z = Z + 1
If Cells(c.Row, 2) = Cells(c.Row + 1, 2) Then
Range("Graph_selected_well").Offset(I, -1) = c
Range("Graph_selected_well").Offset(I, 0) = c.Offset(1, 0)
c.Font.Bold = True
c.Offset(1, 0).Font.Bold = True
Else
Range("Graph_selected_well").Offset(I, -1) = c.Offset(-1, 0)
Range("Graph_selected_well").Offset(I, 0) = c
c.Font.Bold = True
c.Offset(-1, 0).Font.Bold = True
End If
'''coloriage primers sélection en utilisation
With Sheets("listes").Range("Listes_col_primer")
Set d = .Find(Range("Graph_selected_well").Offset(I, -1), LookIn:=xlValues)
End With
Range("Graph_selected_well").Offset(I, -1).Interior.ColorIndex = d.Interior.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.ColorIndex = d.Font.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.Bold = d.Font.Bold
I = I + 1
Sheets("listes").Range("listes_nb_serie_en_cours") = Z
cellsuivante3:
Next c
'if Z = 0 then
Range("Result_intitulé_1") = info1
Range("Result_intitulé_2") = info2
Run "rafraichissement_plaque"
Case "cible"
Z = 0
'''recherche du primer selectionné
If Cells(Target.Row, 2) = Cells(Target.Row + 1, 2) Then
Primer = Target
Else
Primer = Target.Offset(1, 0)
End If
'''coloriage primers sélection en utilisation
With Sheets("listes").Range("Listes_col_primer")
Set d = .Find(Primer, LookIn:=xlValues)
End With
For Each c In Range("Exploit_CT_result")
If Cells(c.Row, 2) = Cells(c.Row + 1, 2) Then GoTo cellsuivante4
Sheets("listes").Range("Graph_selected_well") = Sheets("listes").Range("Graph_selected_well") + 1
If c.Offset(-1, 0) <> Primer Then GoTo cellsuivante4
If c = "" Then GoTo cellsuivante4
Z = Z + 1
Range("Graph_selected_well").Offset(I, -1) = c.Offset(-1, 0)
Range("Graph_selected_well").Offset(I, 0) = c
Range("Graph_selected_well").Offset(I, -1).Interior.ColorIndex = d.Interior.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.ColorIndex = d.Font.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.Bold = d.Font.Bold
I = I + 1
'''mise en gras du puits sélectionné
c.Font.Bold = True
c.Offset(-1, 0).Font.Bold = True
Sheets("listes").Range("listes_nb_serie_en_cours") = Z
cellsuivante4:
Next c
Range("Result_intitulé_1") = info1
Range("Result_intitulé_2") = info2
Run "rafraichissement_plaque"
Case "Ligne"
choix_ligne:
''sélection sur plaque en fonction de l'option choisie
Range("Graph_selected_well") = 0 '''mise à zéro du nombre de série sélectionnées
Range("Exploitation_données_sélection").ClearContents
Range("Exploitation_données_sélection").Interior.ColorIndex = xlNone
info1 = Range("Result_intitulé_1")
info2 = Range("Result_intitulé_2")
Range("Result_intitulé_1") = "Cibles"
Range("Result_intitulé_2") = "SAMPLENAME"
'Run "rafraichissement_plaque"
Range("Exploit_CT_result").FormulaR1C1 = "=Exploit_plate"
Range("Exploit_CT_result") = Range("Exploit_CT_result").Value
Sheets("Exploitation_QPCR").Range("Exploitation_sample_name_selected").ClearContents
Range("Exploitation_listes_primers_in_use").ClearContents
Range("Exploitation_listes_primers_in_use").Interior.ColorIndex = xlNone
I = 0
Dim Ligne_selectionnée As Integer
'''recherche de la ligne selectionnée
If Cells(Target.Row, 2) = Cells(Target.Row + 1, 2) Then
Ligne_selectionnée = Cells(Target.Row, 2)
Else
Ligne_selectionnée = Cells(Target.Row, 2)
End If
I = 0
For Each c In Range("exploitation_intitulé_colonne").Offset(Ligne_selectionnée * 2, 0)
If c = "" Then GoTo cellsuivante5
'''coloriage primers sélection en utilisation
With Sheets("listes").Range("Listes_col_primer")
Set d = .Find(c.Offset(-1, 0), LookIn:=xlValues)
End With
Range("Graph_selected_well").Offset(I, -1) = c.Offset(-1, 0)
Range("Graph_selected_well").Offset(I, 0) = c
Range("Graph_selected_well").Offset(I, -1).Interior.ColorIndex = d.Interior.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.ColorIndex = d.Font.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.Bold = d.Font.Bold
I = I + 1
'''mise en gras du puits sélectionné
c.Font.Bold = True
c.Offset(-1, 0).Font.Bold = True
Sheets("listes").Range("listes_nb_serie_en_cours") = 1
cellsuivante5:
Next c
Range("Result_intitulé_1") = info1
Range("Result_intitulé_2") = info2
Run "rafraichissement_plaque"
Sheets("listes").Range("Graph_selected_well") = 8
Case "colonne"
choix_colonne:
Range("Exploit_CT_result").Font.Bold = False
Range("Graph_selected_well") = 0 '''mise à zéro du nombre de série sélectionnées
Range("Exploitation_données_sélection").ClearContents
Range("Exploitation_données_sélection").Interior.ColorIndex = xlNone
info1 = Range("Result_intitulé_1")
info2 = Range("Result_intitulé_2")
Range("Result_intitulé_1") = "Cibles"
Range("Result_intitulé_2") = "SAMPLENAME"
'Run "rafraichissement_plaque"
Range("Exploit_CT_result").FormulaR1C1 = "=Exploit_plate"
Range("Exploit_CT_result") = Range("Exploit_CT_result").Value
Sheets("Exploitation_QPCR").Range("Exploitation_sample_name_selected").ClearContents
Range("Exploitation_listes_primers_in_use").ClearContents
Range("Exploitation_listes_primers_in_use").Interior.ColorIndex = xlNone
I = 0
Dim colonne_selectionnée As Integer
'''recherche du primer selectionné
colonne_selectionnée = Cells(Range("exploitation_intitulé_colonne").Row, Target.Column)
For Each c In Range("exploitation_intitulé_ligne").Offset(0, colonne_selectionnée)
If Cells(c.Row, 2) = Cells(c.Row + 1, 2) Then GoTo cellsuivante6
If c = "" Then GoTo cellsuivante6
'''coloriage primers sélection en utilisation
With Sheets("listes").Range("Listes_col_primer")
Set d = .Find(c.Offset(-1, 0), LookIn:=xlValues)
End With
Range("Graph_selected_well").Offset(I, -1) = c.Offset(-1, 0)
Range("Graph_selected_well").Offset(I, -1).Select
Range("Graph_selected_well").Offset(I, 0) = c
Range("Graph_selected_well").Offset(I, -1).Interior.ColorIndex = d.Interior.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.ColorIndex = d.Font.ColorIndex
Range("Graph_selected_well").Offset(I, -1).Font.Bold = d.Font.Bold
I = I + 1
'''mise en gras du puits sélectionné
c.Font.Bold = True
c.Offset(-1, 0).Font.Bold = True
Sheets("listes").Range("listes_nb_serie_en_cours") = 8
cellsuivante6:
Next c
Range("Result_intitulé_1") = info1
Range("Result_intitulé_2") = info2
Run "rafraichissement_plaque"
Sheets("listes").Range("Graph_selected_well") = 12
Case Else
'''mise en gras du puits sélectionné
c.Font.Bold = True
c.Offset(-1, 0).Font.Bold = True
Sheets("listes").Range("Graph_selected_well") = 0
End Select
Application.DisplayAlerts = False
Run "Exploitation_info_selection"
''''gestion de l'affichage
'Run "réactivation"
If Sheets("listes").Range("Listes_affichage_exploit") <> "Plaque" Then
Run "Graphiques"
End If
GoTo fin2
End If