For x=21 to 26 If Range("A" & x).Value = "" Then L=x Exit For End if Next Range("A" & L).Value = Vi.Value
For x=21 to 26 If Range("A" & x).Value = "" Then Range("A" & x).Value = Vi.Value Exit For End if Next
On Error Resume Next--
L = Range("A21:A26").SpecialCells(xlCellTypeBlanks).Row
If Err Then
MsgBox "plus de place": Exit Sub
Else
Range("A" & L).Value = Vi.Value
End If
On Error GoTo 0
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionSub Bouton_A5_B5_Cliquer()
Dim Nom As Range
Dim Prix As Range
Set Nom = ThisWorkbook.Worksheets("Tarifs").Range("A5")
Set Prix = ThisWorkbook.Worksheets("Tarifs").Range("B5")
For x = 21 To 37
If x = 37 Then
MsgBox "Plus de place": Exit Sub
Else
If Range("A" & x).Value = Nom.Value Then
Range("B" & x).Value = Range("B" & x).Value + 1
Exit Sub
Else
If Range("A" & x).Value = "" Then
Range("B" & x).Value = 1
Range("A" & x).Value = Nom.Value
Exit For
End If
End If
End If
Next
End Sub