|I came up with 2 different ways to solve this one...|
I offer both of these solutions because I think you should know about the Formula Auditing tool in Excel. My guess is that you aren't aware of it.
Select a cell with a formula in it and click on Tools...Formula Auditing...Evaluate Formula.
Using this feature, you can click the Evaluate button and single step through the formula as it evaluates each part. It's a lot better than just entering stuff in a cell and not having any idea why you are not getting the results you expect.
Try it on both of the formula I offered. Try to understand why the various parts of the formula evaluate to "TRUE" and "FALSE".
I also think you need to review the Help files for IF, AND and OR. The structure you are using is improper in many cases and that is the main reason you are getting the wrong results and errors.
For example, you used AND(D6=1) in your formula.
AND is supposed to be used to determine if 2 or more conditions are TRUE. AND(D6=1) only checks one condition.