Using Formula output to set a status

I would love to be able to use a formula to set a status. For example, I have a two date columns. I use a formula to calculate the difference between the two dates. If it’s negative, I want to set a green status. If it’s between 0 and 14 a yellow status, and over 14 a red status.

I would love to trigger an automation off of the formula to change the status based on the requirements.