Sub importimage()
Dim Shp As Shape
Dim Fichier As String
Dim Cell As Range
Dim Cellule As Integer
Dim Resultat As Integer
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Worksheets("Winged Surecan")
Set F2 = Worksheets("Statut")
Cellule = 5
Resultat = 5
Do While Cells(Cellule, 8).Value <> ""
If Cells(Cellule, 8).Value = "Completely finished & implemented" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
ElseIf Cells(Cellule, 8).Value = "Technical documentation finished" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
ElseIf Cells(Cellule, 8).Value = "Low Probability not to meet timeline M4" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
ElseIf Cells(Cellule, 8).Value = "Medium probability not to meet timeline M4" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
ElseIf Cells(Cellule, 8).Value = "High probability not to meet timeline M4" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
ElseIf Cells(Cellule, 8).Value = "Timeline M4 overdue (Delayed)" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
ElseIf Cells(Cellule, 8).Value = "Not started / paused" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
ElseIf Cells(Cellule, 8).Value = "Phase out" Then
Fichier = "IMG"
Set Shp = Worksheets("Winged Surecan").Shapes.AddPicture(Fichier, msoFalse, msoCTrue, Range("I" & Resultat).Left + (Range("I" & Resultat).Width - 41), Range("I" & Resultat).Top + (Range("I" & Resultat).Height - 17), 17, 19)
Cellule = Cellule + 1
Resultat = Resultat + 1
Else
F1.Range(H100) = ""
End If
Loop
End Sub