|
WPS使用FOR循环,速度奇慢。
Sheets("出入库明细").Activate
reclen = Sheets("出入库明细").UsedRange.Rows.Count
n = 0
For k = 1 To gjs
For i = 11 To reclen
If Sheets("出入库明细").Cells(i, 6) = Sheets("出库录入").Cells(15 + n, 4).Text Then
Sheets("出入库明细").Cells(i, 13) = Sheets("出库录入").Cells(12, 3).Text
Sheets("出入库明细").Cells(i, 14) = Sheets("出库录入").Cells(12, 4).Text
Sheets("出入库明细").Cells(i, 15) = Sheets("出库录入").Cells(12, 5).Text
Sheets("出入库明细").Cells(i, 16) = Sheets("出库录入").Cells(12, 7).Text
Sheets("出入库明细").Cells(i, 17) = Sheets("出库录入").Cells(12, 9).Text
Sheets("出入库明细").Cells(i, 18) = Sheets("出库录入").Cells(15 + n, 13).Text
Sheets("出入库明细").Cells(i, 19) = Sheets("出库录入").Cells(12, 11).Text
Sheets("出入库明细").Cells(i, 20) = Sheets("出库录入").Cells(12, 10).Text
Sheets("出入库明细").Cells(i, 23) = Sheets("出库录入").Cells(15 + n, 13).Text
Sheets("出入库明细").Cells(i, 24) = Sheets("出库录入").Cells(15 + n, 14).Text
Sheets("出入库明细").Cells(i, 25) = Sheets("出库录入").Cells(12, 12).Text
Sheets("出入库明细").Cells(i, 26) = Sheets("出库录入").Cells(12, 13).Text
Sheets("出入库明细").Cells(i, 27) = Sheets("出库录入").Cells(12, 14).Text
n = n + 1
Else
End If
Next i
Next k
请教:代码哪里有问题。谢谢!
|
|