I have the code like below, the problem is that the state after and doesn't work. Seems to be that works only fisrt part of IF.Do you have any
sugestion? I want to count workbooks without sheet named "BOM" and cell A13 different of END.
sugestion? I want to count workbooks without sheet named "BOM" and cell A13 different of END.
Code:
Dim ww As Integer
Dim cpt As Integer
Dim Wb As Workbook
For Each Wb In Workbooks
If Left(Wb.Sheets(1).name, 3) <> "BOM" And Wb.Sheets(1).Range("A13") <> "END" Then
cpt = cpt + 1
Else
End If
Next
MsgBox ww - cpt