what is wrong here?
Sub save_and_exit()
AllFilled = True
For Each cll In Range("a7:a13", "d7:d13", "g7:g13", "a21:a27", "d21:d27", "g21:g27").Cells
If cll.Value > 0.1 Then
If Not cll.Offset(, 1) > 0.1 Then
AllFilled = False
Exit For
End If
End If
Next cll
If AllFilled Then
ActiveWorkbook.Save
MsgBox "Changes saved"
Application.Quit
Else
MsgBox "Can not save. Cell " & cll.Offset(, 1).Address(False, False)
End If
End Sub
EDIT.
ok some "" where not supposed to be there. fixed it. how can I make it check the ones on the left as well? meaning, if A is filled so shoould B be. If B is filled so should A
Bookmarks