3个回答
展开全部
ah3有3个03、05、11公式为=IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=4))>0,TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=4,ROW($1:$100)-1),1),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=4))>1,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=4,ROW($1:$100)-1),2),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=4))>2,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=4,ROW($1:$100)-1),3),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=4))>3,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=4,ROW($1:$100)-1),4),"00"),"")数组公式同时按ctrl+shift+回车结束,下拉
ai3=IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>0,TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),1),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>1,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),2),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>2,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),3),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>3,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),4),"00"),"")数组公式同时按ctrl+shift+回车结束,下拉
ai3=IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>0,TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),1),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>1,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),2),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>2,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),3),"00"),"")&IF(SUM(--(COUNTIF(B3:BF3,TEXT(ROW($1:$100)-1,"00"))=1))>3,";"&TEXT(SMALL(IF(COUNTIF(B3:AF3,TEXT(ROW($1:$100)-1,"00"))=1,ROW($1:$100)-1),4),"00"),"")数组公式同时按ctrl+shift+回车结束,下拉
更多追问追答
追问
显示不出来
追答
你b-af是自定义格式为2位数吗
展开全部
若是要2003版本的操作公式,实现左边的数据结构达到右边的目标效果,估计是麻烦大了啊!
真的很难做到目标效果!
真的很难做到目标效果!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我提供个VBA的思路,函数太烧脑,按ALT+11打开VBE编辑器,插入模块,粘贴代码,光标停留在程序代码内,按F5运行程序。(前提是要先启用宏)
Sub TEST()
Dim d, brr(1 To 1000, 1 To 2)
Set d = CreateObject("Scripting.Dictionary")
arr = Range("B3").CurrentRegion
For i = 1 To UBound(arr)
For j = 1 To UBound(arr, 2)
If Len(arr(i, j)) Then
If Not d.exists(arr(i, j)) Then
d(arr(i, j)) = 1
Else
d(arr(i, j)) = d(arr(i, j)) + 1
End If
End If
Next j
t = d.keys: tt = d.items
For ii = 0 To d.Count - 1
m = d(t(ii))
Select Case m
Case 1
mm = t(ii)
brr(i, 2) = brr(i, 2) & ";" & mm
Case 4
kk = t(ii)
brr(i, 1) = brr(i, 1) & ";" & kk
End Select
Next ii
d.RemoveAll
brr(i, 1) = Mid(brr(i, 1), 2)
brr(i, 2) = Mid(brr(i, 2), 2)
Next i
d.RemoveAll
Range("AH3").Resize(UBound(brr, 1), UBound(brr, 2)) = ""
Range("AH3").Resize(UBound(brr, 1), UBound(brr, 2)) = brr
End Sub
Sub TEST()
Dim d, brr(1 To 1000, 1 To 2)
Set d = CreateObject("Scripting.Dictionary")
arr = Range("B3").CurrentRegion
For i = 1 To UBound(arr)
For j = 1 To UBound(arr, 2)
If Len(arr(i, j)) Then
If Not d.exists(arr(i, j)) Then
d(arr(i, j)) = 1
Else
d(arr(i, j)) = d(arr(i, j)) + 1
End If
End If
Next j
t = d.keys: tt = d.items
For ii = 0 To d.Count - 1
m = d(t(ii))
Select Case m
Case 1
mm = t(ii)
brr(i, 2) = brr(i, 2) & ";" & mm
Case 4
kk = t(ii)
brr(i, 1) = brr(i, 1) & ";" & kk
End Select
Next ii
d.RemoveAll
brr(i, 1) = Mid(brr(i, 1), 2)
brr(i, 2) = Mid(brr(i, 2), 2)
Next i
d.RemoveAll
Range("AH3").Resize(UBound(brr, 1), UBound(brr, 2)) = ""
Range("AH3").Resize(UBound(brr, 1), UBound(brr, 2)) = brr
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询