多区域转单列的通用公式
分享一个自己写的多区域转单列的通用公式。 写的比较复杂,也求大佬能提供更简单的方法。用PQ吧,ToColumns(或者ToRows),然后合并List,去空值(是否去重根据自己的需要来) Sub test01()
Dim r As Range, A As Range, rn As Range
Dim d As Object
Set d = CreateObject("Scripting.Dictionary")
Set r = Columns("A:K").SpecialCells(xlCellTypeConstants, 23)
For Each A In r.Areas
For Each rn In A
d(rn.Value) = Empty
Next
Next
Range("O5").Resize(d.Count) = WorksheetFunction.Transpose(d.keys())
End Sub =INDIRECT(TEXT(SMALL(IF(A$1:K$124>0,ROW($1:$124)/1%+COLUMN(A:K),99999),ROW(A1)),"R0C00"),)
数组三键下拉。 谢谢大佬赐教 谢谢大佬赐教
页:
[1]