I've assumed that you want to return to the B1 value once you've reached the B10 value and another click is made.
Private Sub CommandButton1_Click()
If IsError(Application.Match(Range("A1").Value, Range("B1:B10"), 0)) Then
Range("A1").Value = Range("B1").Value
ElseIf Application.Match(Range("A1").Value, Range("B1:B10"), 0) = Range("B1:B10").Cells.Count Then
Range("A1").Value = Range("B1").Value
Else
Range("A1").Value = Range("B1").Offset(Application.Match(Range("A1").Value, Range("B1:B10"), 0), 0).Value
End If
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…