Just wondering, how can I have two of these instances on one worksheet?

So C1 would already have turned blank as a date had been input into M1. But a later part of the process a “Yes” needs to go in R1 but, as soon as a date is input in Y1, I need R1 to go blank too.

So this is two separate processes, C1 and M1 would always be completed before R1 and Y1.

I tried just copying and pasting the same code in twice for the worksheet but got an error.