On My spreadsheet, if cell D12 is NOT(ISBLANK) or in otherwords it has something in it, AND another cell Q12, is ISBLANK, cell p12 should say 1, otherwise 0.
So if cell D12 hasn't got anything in it, or cell Q12 has got something in it, the answer should be 0.

I wrote it like this:
IF(AND(NOT(ISBLANK(D12)),ISBLANK(Q12)),1,0)
Do I need and OR statement too? for the opposite calculation? Ive tried every combination.