Code: Select all
Sub STEP4()
Dim Wb1 As Workbook
Set Wb1 = ActiveWorkbook
Set ws1 = Wb1.Worksheets.Item(2)
With ws1
For Each cl In Columns(11).SpecialCells(2, 1)
cl.Value = Int(Application.Min(60, cl.Value))
Next cl
End With
Wb1.Save
End Sub
Error Details: runt time error 1004
no cells were found
Highlighted line: For Each cl In Columns(11).SpecialCells(2, 1)
Thnx For the Help