# Conditional Formatting for Comparing Dates



## 94mustang (Jan 7, 2023)

Hello Excel Experts,

I am needing much help creating a conditional formatting custom formula to highlight the intersecting cells.  See the attached example screenshot.  Take a look at the 4 dates for Facility 15 (Row 81) and I have manually highlighted each corresponding dates that match the intersection of the header dates.  I just want to be able to enter dates for each facility in the Date1 to Date4 columns and the corresponding intersecting match date to be highlighted with a background color.  I will have many more facilities to add but just wanted to give a good representative example in this thread of what I am trying to accomplish.

I think it might be an array formula to accomplish this but not confident.  I have been trying to use the month and year function of date1 to date4 to match the month and year of the header dates with no success.  Any help will be greatly appreciated.  Thank you.


----------



## Peter_SSs (Sunday at 12:36 AM)

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the *best solution often varies by version*. (Don’t forget to scroll down & ‘Save’)

I also suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

My dates are in d/m/y format and I'm unsure of your column range but see if this will work for you.

23 01 08.xlsmBCDEFGHIJKLMNOPQRSTUVWXYZAAABAC801/01/231/02/231/03/231/04/231/05/231/06/231/07/231/08/231/09/231/10/231/11/231/12/231/01/241/02/241/03/241/04/241/05/241/06/241/07/241/08/241/09/241/10/241/11/241/12/248125/01/202317/05/20239/08/20248/10/20258215/03/202321/09/202383CFCells with Conditional FormattingCellConditionCell FormatStop If TrueF81:AC85Expression=MATCH(F$80,$B81:$AZ81-DAY($B81:$AZ81)+1,0)textNO


----------



## 94mustang (Sunday at 1:15 PM)

Hello Peter_SSs,

It has been a few years since I have been on this forum.  My company recently converted from Google to Microsoft.  Thank you so much for your advice as I have already visited my account and updated my profile.  I have also click on the link for the minisheets so the next time I have a question, I will use this as well.  Finally, your post contained the solution to my problem.  This is amazing.  Thank you so very much for your help.  How do I give you credit or stars in this forum?


----------



## Peter_SSs (Sunday at 5:27 PM)

You're welcome. Thanks for the follow-up. 
Also for updating your details. 



94mustang said:


> How do I give you credit or stars in this forum?


You mark the answer that solved your question (which you have already done). If you want you can also click the 'Like' icon at the bottom right of any post but those 'Likes' don't get used for anything.


----------

