发布网友 发布时间:2022-04-29 14:55
共4个回答
热心网友 时间:2022-05-23 00:18
Sub PPOP()
Dim a As Range, ARR(0 To 9), BRR(0 To 9), i%, k%, b As Range
Range("C1:f9999").Clear
For Each a In Range(Range("A1"), Range("A65535").End(3))
For i = 0 To 9
ARR(i) = 0
BRR(i) = i
Next i
For i = 1 To Len(a)
ARR(Mid(a, i, 1)) = ARR(Mid(a, i, 1)) + 1
Next i
'对数组个数进行排序
For k = 0 To 8
For i = k + 1 To 9
If ARR(BRR(k)) <= ARR(BRR(i)) Then
X = BRR(k)
BRR(k) = BRR(i)
BRR(i) = X
If BRR(k) < BRR(i) And ARR(BRR(k)) = ARR(BRR(i)) Then
X = BRR(k)
BRR(k) = BRR(i)
BRR(i) = X
End If
End If
Next i
Next k
Set b = a.Offset(0, 2)
For j = 0 To 9
For k = 1 To ARR(BRR(j))
b = b & " " & BRR(j)
Next k
Next j
Next a
End Sub
热心网友 时间:2022-05-23 01:36
=CONCAT(MOD(LARGE((LEN(A1)-LEN(SUBSTITUTE(A1,MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),"")))*10+MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),ROW(INDIRECT("1:"&LEN(A1)))),10))你好,如果数字是分开的,想要的排序也是分开的,原公式应该怎样修改才可以啊?
热心网友 时间:2022-05-23 03:11
本方法适合07及以上版本热心网友 时间:2022-05-23 05:02
如果版本支持的话
=CONCAT(LET(x,FILTER(ROW($2:$11)-1,ISNUMBER(FIND(ROW($2:$11)-1,A2))),y,LEN(A2)-LEN(SUBSTITUTE(A2,x,)),SORTBY(REPT(x,y),y,-1,x,-1)))