I have something that will automatically produce items for me, but I want it to skip and not produce if this cell is equal to zero after performing select accounting.
Sub AutoMakeInv()
Dim lPrefix As Long
Dim lCount As Long
Dim Account_Number As String
For lPrefix = 1 To 14
For lCount = 1 To 2000
Account_Number = "F" & Format(lPrefix, "00") & " " & Format(lCount, "0000")
Debug.Print Account_Number
Cells(8, 5).Value = Account_Number
Call SelectAcct
Call ProduceInv
' Do something ...
Next lCount
Next lPrefix
End Sub