Merci à tous les deux pour vos réponses. J'ai essayé le code ci-dessous mais j'ai la même erreur à la même ligne
Set rng = Range("A3:P1449")
For i = 3 To rng.Rows.Count Step 3
Cells(i, "A").Value = "Numéro Fiche forum:"
Cells(i, "A").Font.Bold = True
Cells(i, "B").Font.Bold = True
Cells(i, "B").Font.ColorIndex = 3
Cells(i + 1, "A").Value = "Question:"
Cells(i + 1, "A").Font.Bold = True
If Cells(i, "J") <> "" Then
Cells(i + 1, "B").Value = Cells(i, "J").Value
Else
If InStr(1, Cells(i + 1, "P").Value, "Réponse :") <> 0 Then
Cells(i + 1, "B").Value = Split(Cells(i + 1, "P").Value, "Réponse")(0)
Else
Cells(i + 1, "B").Value = "N/A"
End If
End If
Cells(i + 2, "A").Value = "Réponse:"
Cells(i + 2, "A").Font.Bold = True
If InStr(1, Cells(i + 1, "P").Value, "Réponse :") <> 0 Then
Cells(i + 2, "B").Value = Split(Cells(i + 1, "P").Value, "Réponse")(1)
Else
Cells(i + 2, "B").Value = "N/A"
End If
Next i
Columns("A:B").WrapText = True
Columns("A:B").HorizontalAlignment = xlLeft
Columns("A:B").VerticalAlignment = xlVAlignCenter
End Sub
EDIT :
même erreur en utilisant If Cells(i + 1, "P") Like "*Réponse*" Then à la place de InSTR
Merci par avance