|
Sub arrange()
Dim sht As Worksheet
Dim x As Range
Dim arr(), n&
n = 0
For Each sht In Sheets(Array("6950-24(橘+蓝)", "6950-28(橘+蓝)"))
With sht
For Each x In .Range("c8:c" & .[c8].End(xlDown).Row)
For Each xx In .Range(.Cells(x.Row, 5), .Cells(x.Row, 256))
If xx.Row Mod 2 = 0 And xx <> "" Then
n = n + 1
ReDim Preserve arr(1 To 3, 1 To n)
arr(1, n) = Cells(xx.Row, 3).Value
arr(2, n) = Cells(7, xx.Column)
arr(3, n) = xx.Offset(1, 0)
Debug.Print arr(1, n) & arr(2, n) & arr(3, n)
End If
Next xx
Next x
End With
Next sht
Sheets("要求结果").[b2].Resize(n, 3) = Application.Transpose(arr)
End Sub |
|