A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hello @Mary Ballard
Thank you for reaching out to Microsoft Q&A.
Based on the information you provided, I understand that you want to use conditional formatting to highlight cells when:
- The date in column A matches the date in column G, allowing for a ±1 day difference, and
- The values in column E and column L match.
Your current formula works for exact date matches but misses some cases because the dates can be off by one day. After reproducing this scenario in my test environment with sample data, the following approach produced the expected result.
Please make sure columns A and G are formatted as Date. Identify the formula delimiter used on your machine. Most English‑language Excel versions use a comma (,), but some regional settings use a semicolon (;)
Then, please follow the following steps:
Select the range you want to highlight (for example: E1:E10) > Go to Home > Conditional Formatting > New Rule > Choose “Use a formula to determine which cells to format” > Use this formula:
=COUNTIFS($L$1:$L$500,$E1,$G$1:$G$500,">="&INT($A1)-1,$G$1:$G$500,"<="&INT($A1)+1)>0
This should now correctly highlight all expected matches.
If your actual data structure is different from this sample (for example, different ranges or headers), feel free to share more details and I can adjust the formula accordingly.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.