Hello everybody,

I`d like to ask you for some help.
I`m cleaning log files. The aim is to find all zeros in column B and detele any value in adjacent cell in column A. And I`d like to do that in multiple files in a folder (called ZkouskaMakra).

My current code fails to work. When it reaches Set F1 it performs in the file I`m running it from not in the file I want to run it in.
( I tried substituting .Font.Bold = True for the part between Set F1 and End If ... that worked in all the files. That makes me think that till With wb... it is correct)

Please tell me what`s wrong


Sub MultipleFileMacro()

Dim wb As Excel.Workbook
Dim fso As Scripting.FileSystemObject
Dim f As Scripting.File

Dim F1 As Range
Dim F2 As String

Set fso = New Scripting.FileSystemObject
For Each f In fso.GetFolder("D:\ZkouskaMakra").Files
Set wb = Workbooks.Open(f)

With wb.Worksheets("List1").Range("b2", "b5000")
Set F1 = .Find(What:=0, LookIn:=xlValues, LookAt:=xlWhole, searchorder:=xlByRows, searchdirection:=xlNext)


If Not F1 Is Nothing Then
F2 = F1.Address
Do
Cells(F1.Row, F1.Column - 1) = ""
Set F1 = .FindNext(F1)
Loop Until F1.Address = F2
End If
End With


wb.Save
wb.Close
Next f

End Sub