请专家用vba帮忙按大小排序答:Sub 按大小排序情形一()'' Macro按大小排序情形一 Macro 'Dim m, n, o, p, q, r, s, t, u, v, w As Long Dim rng As Range Dim i, j As Integer Dim mn As Double m = Range("A65535").End(xlUp).Row Cells(1, 2).Value = "公式一,求位数"Cells.Replace What:="公式...
学Excel VBA,定义了一个lottery函数,为什么不是出现7个随机数,而是7个...答:9)For i = 2 To 7 lottery = lottery & "," & Application.WorksheetFunction.RandBetween(0, 9)Next iEnd Function 兄弟:实际上你的程序只要把rand改在rnd就能生成一个数,只不过最后你是lottery = l,就是返回数组L的第一个值,不会生成7个数,但最少不会是#NAME?,前面两位哥们回答的都对,...