求Excel任意几个个数字4个组合排列与3个一组排列组合公式
发布网友
发布时间:2022-04-28 12:56
我来回答
共1个回答
热心网友
时间:2023-10-09 14:50
Function 朱科技(zhu As Range, num As Integer)
r = zhu.Rows.Count
For c1 = 1 To r
For c2 = 1 To r
If c2 <> c1 Then
For c3 = 1 To r
If c3 <> c1 And c3 <> c2 Then
For c4 = 1 To r
If c4 <> c1 And c4 <> c2 And c4 <> c3 Then
rr = rr + 1
朱科技 = zhu(c1, 1) & "," & zhu(c2, 1) & "," & zhu(c3, 1) & "," & zhu(c4, 1)
If rr = num Then Exit Function
End If
Next
End If
Next
End If
Next
Next
End Function
热心网友
时间:2023-10-09 14:50
Function 朱科技(zhu As Range, num As Integer)
r = zhu.Rows.Count
For c1 = 1 To r
For c2 = 1 To r
If c2 <> c1 Then
For c3 = 1 To r
If c3 <> c1 And c3 <> c2 Then
For c4 = 1 To r
If c4 <> c1 And c4 <> c2 And c4 <> c3 Then
rr = rr + 1
朱科技 = zhu(c1, 1) & "," & zhu(c2, 1) & "," & zhu(c3, 1) & "," & zhu(c4, 1)
If rr = num Then Exit Function
End If
Next
End If
Next
End If
Next
Next
End Function