|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub 按钮1_Click()
Application.ScreenUpdating = False
Set ash = ActiveSheet
ash.UsedRange.ClearContents
a = 1
For Each sh In Sheets
If sh.Name <> ash.Name Then
Set rn = Nothing
With sh
For j = 1 To .Cells(Rows.Count, 3).End(3).Row
If .Cells(j, 3) = 130 Then
If rn Is Nothing Then
Set rn = .Cells(j, 1).EntireRow
Else
Set rn = Union(rn, .Cells(j, 1).EntireRow)
End If
End If
Next j
End With
If Not rn Is Nothing Then
rn.Copy ash.Cells(a, 1)
a = ash.Cells(Rows.Count, 3).End(3).Offset(1).Row
End If
End If
Next sh
Application.ScreenUpdating = True
End Sub |
评分
-
1
查看全部评分
-
|