Conditional Formatting to highlight duplicates within 3 rows of each other

gravanoc

Active Member
Joined
Oct 20, 2015
Messages
348
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have a chart of exercises that shouldn't be repeated within a 3 day timeframe. What I would like is for the conditional formatting to highlight all instances where they are repeated within any 3 day range. My current rule doesn't seem to work as well as I'd like. It highlights the first instance, but not the other. My rule is =COUNTIF($L4:$Z6,L4)>1 for reference.

Here's what it looks like:
1652775851249.png
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
In the image:
- Are cells with yellow manual income, or results from your current CF?
- Where is the row and column number? I could not find what cell is L4 or Z6.

Pls post again to display row-column index and manual hightlight the outcome.
 
Upvote 0
Can you give us some sample data that we can copy to test with. XL2BB
 
Upvote 0
@bebo021999 - Those are cond. formatting results. I've posted the xl2bb to assist with column & row headers. The cond. formatting rule doesn't need to go to Z for this example.

Training Book v3.xlsm
LMNOP
3Exercise 1Exercise 2Exercise 3Exercise 4Exercise 5
4AL - Plank In and Out
5AL - Plank In and Out
6
7AL - Plank In and Out
8
9
10
11AL - Plank In and Out
12
13
14
15AL - Squat Jack to Reverse Bear Crawl
16
17AL - Squat Jack to Reverse Bear Crawl
18AL - Squat Jack to Reverse Bear Crawl
19
20AL - Squat Jack to Reverse Bear Crawl
January
Cells with Conditional Formatting
CellConditionCell FormatStop If True
L4:Z34Expression=COUNTIF($L4:$Z6,L4)>1textNO
 
Upvote 0
Perhaps add a second condition, to apply exactly the same format, but with the expression
=COUNTIF($L2:$Z4,L4)>1

Or combine both conditions in to one, with an OR statement, like this
=OR(COUNTIF($L4:$Z6,L4)>1,COUNTIF($L2:$Z4,L4)>1)
 
Upvote 0
Solution
Actually on second thoughts, you can probably modify that to be even simpler, like this . . .

=COUNTIF($L2:$Z6,L4)>1
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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