精选优质文档-倾情为你奉上自动生成舒尔特表格假设结果生成后显示在A1:E5单元格区域,鼠标右击工作表标签,选择“查看代码”,输入如下代码:Sub 生成舒尔特方格() Dim i, j, k As Integer Dim x(25) As Integer For i = 1 To 25 x(i) = (25 - 1) * Rnd() + 1 Do While WorksheetFunction.CountIf(Range(Cells(1, 256), Cells(i, 256), x(i) 0 x(i) = (25 - 1) * Rnd() + 1 Loop Cells(i, 256) = x(i) Next k = 0 For i = 1 To 5 For j = 1 To 5 k = k + 1 Cells(i, j) = x(k) Next