toto = "JJEJEJE BP 5000 JIII" If toto Like "*BP*" Then titi = "BP" & Val(Mid(toto, InStr(toto, "BP") + 2)) MsgBox titi End If
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionw = InStr(1, "BP")
Sub test_II() With Range("A1:A" & [A65536].End(xlUp).Row).SpecialCells(xlCellTypeConstants) For i = 1 To .Rows.Count SearchString = .Cells(i, 1).Value SearchChar = "BP" w = InStr(SearchString, SearchChar) If .Cells(i, 1) Like "*BP*" Then Valeu = "BP" & Val(Mid(SearchString, InStr(SearchString, "BP") + 2)) .Cells(i, 3).Value = Valeu End If Next End With End Sub