|
▼かずこ さん:
どんな並び替えなのか全くわかりません。
とりあえず、たたき台として。
Sub test()
Dim srtl As Object
Dim c As Range, k As String
Dim i As Long, r As Range, n As Long
Set srtl = CreateObject("system.collections.sortedlist")
For Each c In Columns(1).SpecialCells(xlCellTypeConstants)
If c.Value Like "?##-##-#" Then
k = c.Value
Set srtl(k) = c
Else
Set srtl(k) = Union(srtl(k), c)
End If
Next
Worksheets.Add
For i = 0 To srtl.Count - 1
Set r = srtl.getbyindex(i)
If r.Count > 1 Then
Cells(1).Offset(n).Resize(r.Count).Value = r.Value
n = n + r.Count
End If
Next
End Sub
|
|