看来楼主只要一组就行,改为每次只产生一组
Sub 生成3()
[c10].ClearContents
Do Until [c10] <> ""
For i = 1 To 9
Cells(i, 3) = Application.RandBetween([c11] - 50, [c11] + 50)
Next
s = [c11] * 10 - Application.sum([c1:c9])
If s > [c11] - 51 And s < [c11] + 51 Then [c10] = s
Loop
End Sub
