我想要实现的是我的工作簿中所有工作表中的最大值,并将它们收集到一个特定的工作表中回应并冻结如果有人可以提供帮助,我将不胜感激。
Dim wsDst As Worksheet
Dim ws As Worksheet
Dim x As Long
Dim lngMax As Long
Set wsDst = Sheets("Summary")
Application.ScreenUpdating = False
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> wsDst.Name And ws.Name <> "Amirhossein" Then
For ZZ = 4 To 9999
For Q = 25 To 9999
With ws
x = Application.WorksheetFunction.max(.Cells(ZZ, 26))
If x > lngMax Then
wsDst.Cells(Q, 10).Value = x
lngMax = wsDst.Cells(Q, 10).Value
End If
End With
Next Q
Next ZZ
End If
Next ws