If two dates are equal, color the cell

Hello! I created a Monday Board, with two columns and both of them are dates (setup with the date format each of them). I will call the colum with the date 1 “Date_1” and the column with the other date “Date_2”.

I want to setup a rule if “Date_1” is EQUAL to “Date_2”, color the cell of the “Date_2” in green. If “Date_1” is NOT EQUAL to “Date_2”, color the cell of the “Date_2” in red.

I checked the conditional format and the issue is that if I take the “Date_1” column, it does not let me to set up the rule of EQUAL “Date_2”; it just let me to EQUAL “today”, “tomorrow”,… which is a rule I don’t need.

Can you please help me out with this request? Thank you!!

Hi Marta,

The workaround would be to create a formula column, use a formula like {date_1}={date_2} and set up the coloring on Formula.

If you don’t want coloring when both dates are empty, use for formula:

IF(AND({date_1}<>"",{date_2}<>""),{date_1}={date_2},"")


Looking for a simpler way to write complex formulas? Check out the Advanced Formula Booster at https://mdboosters.com. It’s a convenient third-party app that simplifies formula writing. With it, you can spread your formulas across several lines, utilize variables, and access dozens of functions not found in the standard formula column.

Hi @GCavin ! Thanks a lot for taking the time to check my request - super useful already!

Another question, rather than creating a new FORMULA column (where I can apply the suggested formula), is there a way that the column that gets colored is the own “Date_2” column? So I will have “Date_1” column and “Date_2” column, and in case the date is the same, the “Date_2” cell will become green and if the dates are different, the “Date_2” cell will become red instead.

Many thanks for your time in advance!
Marta

As you already know you can’t colorize the date_2 column based on date_1.

The closest you can do which is a slight variant of the preceeding suggestion is to use this syntax for the formula column:

IF(AND({date_1}<>"",{date_2}<>""),IF({date_1}={date_2},{date_2},""))

This will copy date_2 to the formula column if the 2 dates match. Otherwise the column will be blank.

Then you can get this formula column colored with a conditional coloring that reads when “Formula in not empty”. So your date will be colored, but not in date_2, in the formula column…



Want to get rid of the formula column? and write formulas that support multiple lines, variables and can update various columns at once? Take a look at the Advanced Formula Booster at https://mdboosters.com*

1 Like

Hey @GCavin , thank you so much!!

Thanks for sharing the workaround with me - it will help my team a lot!!