|First, for the AND function to work, you have to close the parenthesis. The 0 result you want needs to be an argument of the IF function, not an argument of the AND as you have it.|
Should be this:
That allows the AND to be TRUE or FALSE based on the values in R23 and Q23.
This might get you closer, although I have not set up a spreadsheet with all of the variables needed to test it.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.