|
代码如下:
Sub xxx()
Application.Calculation = xlCalculationManual
Sheets("数据提取").Range("C2:L10000").ClearContents
Dim i As Worksheet
For Each i In ThisWorkbook.Sheets
If i.Name <> "中2库存" Or i.Name <> "开工系统数" Or i.Name <> "开工对比" Then
lr = i.Cells(65536, 3).End(xlUp).Row
For j = 5 To lr
If i.Cells(j, "N") <> "√" Then 'M列
b = Sheets("数据提取").Cells(65536, 3).End(xlUp).Row + 1
i.Range("C" & j & ":L" & j).Copy Sheets("数据提取").Cells(b, "C") 'C:L列
Sheets("数据提取").Cells(b, "A") = i.Range("C1")
End If
Next
End If
Next
Application.Calculation = xlCalculationAutomatic
End Sub
这个代码已经指定不运行的表格了,但在运行代码时,依然会将整个工作薄都处理,是不是那里不对,帮忙看看?
|
|