Find Duplicates and change font color based on other cell value

Ramadan

Board Regular
Joined
Jan 20, 2024
Messages
131
Office Version
  1. 2021
Platform
  1. Windows
I have a table with cell value (Codes) in column "E"and date value in column "I"
and because of these codes might be duplicated many times while I need only maximum two cells can be valid with the same code based on the date value in "I" if >=TODAY().
so I need a help please to check if there are more than two cells value duplicated in "E" and have a date in "I" >=TODAY() then to change the these cells font color to red

can you help me please how to do thatwith a formula or conditional formatting
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
a count
=COUNTIFS($E:$E, $E1,$I:$I,">="&TODAY())>1

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A1:I100 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=COUNTIFS($E:$E, $E1,$I:$I,">="&TODAY())>1

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

Book3
ABCDEFGHI
1code
2a9/9/24
3bc9/9/24
4code9/9/24
5d9/9/24
6e9/9/24
7f9/9/24
8g9/9/24
9h9/9/24
10f9/9/24
11a9/9/24
12d9/9/24
139/9/24
Sheet1
Cell Formulas
RangeFormula
I2:I13I2=TODAY()
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:I13Expression=COUNTIFS($E:$E, $E1,$I:$I,">="&TODAY())>1textYES
 
Upvote 0
Solution
a count
=COUNTIFS($E:$E, $E1,$I:$I,">="&TODAY())>1

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A1:I100 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=COUNTIFS($E:$E, $E1,$I:$I,">="&TODAY())>1

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

Book3
ABCDEFGHI
1code
2a9/9/24
3bc9/9/24
4code9/9/24
5d9/9/24
6e9/9/24
7f9/9/24
8g9/9/24
9h9/9/24
10f9/9/24
11a9/9/24
12d9/9/24
139/9/24
Sheet1
Cell Formulas
RangeFormula
I2:I13I2=TODAY()
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:I13Expression=COUNTIFS($E:$E, $E1,$I:$I,">="&TODAY())>1textYES
thank you so much
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,471
Members
453,726
Latest member
JoeH57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top