Application.ScreenUpdating = False
drr = Array("表头", "发货时间", "单据编码", "店铺类型", "订单类型", "店铺名称", "平台单号", "商品名称", "数量", "让利后金额", "成本总价", "物流费用", "订单编码", "订单标识", "物流公司", "物流单号")
nn = Application.GetOpenFilename("Excel 文件 ,*.xls*;*.xlsx*;*.csv*")
Set wb = GetObject(nn)
't = wb.Sheets(1).Cells(Rows.Count, 5).End(xlUp).Row
arr = wb.Sheets(1).Range("a1:cq" & Cells(Rows.Count, 5).End(xlUp).Row)
With wb
For i = 1 To UBound(arr)
n = n + 1
For b = 1 To UBound(drr)
Rng = wb.Sheets(1).Rows(1).Find(drr(b), lookat:=xlWhole).Column
ReDim Preserve brr(1 To 15, 1 To n)
brr(b, n) = arr(1, Rng)
If arr(i, 15) Like "快速发货" Then
' k = k + 1
ReDim Preserve crr(1 To 15, 1 To k)
crr(b, k) = arr(1, Rng.Column)
End If
Next
Next
End With
Application.ScreenUpdating = True
End Sub
哪位大神帮忙看一下,这是错在哪里了?
|