Sub 題名() Dim x As Long Do Until Range("A1") Or Range("A2") Or Range("A3") Or Range("A4") Or Range("A5") Or Range("A6") Or Range("A7") Or Range("A8") Or Range("A9") Or Range("A10") = 30 x = Int(Rnd() * 10) + 1 If x = 1 Then Range("A1") = Range("A1").Value + 1 If x = 2 Then Range("A2") = Range("A2").Value + 1 If x = 3 Then Range("A3") = Range("A3").Value + 1 If x = 4 Then Range("A4") = Range("A4").Value + 1 If x = 5 Then Range("A5") = Range("A5").Value + 1 If x = 6 Then Range("A6") = Range("A6").Value + 1 If x = 7 Then Range("A7") = Range("A7").Value + 1 If x = 8 Then Range("A8") = Range("A8").Value + 1 If x = 9 Then Range("A9") = Range("A9").Value + 1 If x = 10 Then Range("A10") = Range("A10").Value + 1 End If Loop End Sub