Option Compare Text

Dim c As Long, Coul As Long
Dim Haut As Double, Gauche As Double
Dim Orientation As String

Sub Fleches()
    Application.ScreenUpdating = False

    For Each Fl In ActiveSheet.Shapes
        If Left(Fl.Name, 6) = "Flèche" Then Fl.Delete
    Next
    
    DerLig = Range("A" & Rows.Count).End(xlUp).Row
    For i = 2 To DerLig
        If Cells(i, "B") >= 0.93 And Cells(i, "G") < Cells(i, "B") Then
            'verte haut
            Coul = 11
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche vers le haut " & i - 1
            VersLeHaut
        ElseIf Cells(i, "B") >= 0.93 And Cells(i, "G") > Cells(i, "B") Then
            'verte basse
            Coul = 11
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche vers le bas " & i - 1
            VersLaBas
        ElseIf Cells(i, "B") >= 0.93 And Cells(i, "G") = Cells(i, "B") Then
            'verte horizontale
            Coul = 11
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche droite " & i - 1
            VersLaDroite
            
        ElseIf Cells(i, "B") < 0.93 And Cells(i, "B") > 0.88 And Cells(i, "G") < Cells(i, "B") Then
            'jaune haut
            Coul = 13
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche vers le haut " & i - 1
            VersLeHaut
        ElseIf Cells(i, "B") < 0.93 And Cells(i, "B") > 0.88 And Cells(i, "G") > Cells(i, "B") Then
            'jaune basse
            Coul = 13
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche vers le bas " & i - 1
            VersLaBas
        ElseIf Cells(i, "B") < 0.93 And Cells(i, "B") > 0.88 And Cells(i, "G") = Cells(i, "B") Then
            'jaune horizontale
            Coul = 13
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche droite " & i - 1
            VersLaDroite
            
        ElseIf Cells(i, "B") < 0.88 And Cells(i, "G") < Cells(i, "B") Then
            'rouge haut
            Coul = 10
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche vers le haut " & i - 1
            VersLeHaut
        ElseIf Cells(i, "B") < 0.88 And Cells(i, "G") > Cells(i, "B") Then
            'rouge basse
            Coul = 10
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche vers le bas " & i - 1
            VersLaBas
        ElseIf Cells(i, "B") < 0.88 And Cells(i, "G") = Cells(i, "B") Then
            'rouge horizontale
            Coul = 10
            Haut = Cells(i, "J").Top
            Gauche = Cells(i, "J").Left
            Orientation = "Flèche droite " & i - 1
            VersLaDroite
        End If
    Next i
End Sub

Sub VersLeHaut()
    ActiveSheet.Shapes.AddShape(msoShapeUpArrow, Gauche, Haut, 10, 10).Select
    Selection.Name = Orientation
    Selection.ShapeRange.Fill.ForeColor.SchemeColor = Coul
End Sub

Sub VersLaDroite()
    ActiveSheet.Shapes.AddShape(msoShapeRightArrow, Gauche, Haut, 10, 10).Select
    Selection.Name = Orientation
    Selection.ShapeRange.Fill.ForeColor.SchemeColor = Coul
End Sub

Sub VersLaBas()
    ActiveSheet.Shapes.AddShape(msoShapeDownArrow, Gauche, Haut, 10, 10).Select
    Selection.Name = Orientation
    Selection.ShapeRange.Fill.ForeColor.SchemeColor = Coul
End Sub

