Conditional Formatting to higlight the second time a result is returned in a row

saraapple

Board Regular
Joined
Feb 3, 2020
Messages
165
Office Version
  1. 2010
Platform
  1. Windows
I have a table of data with some repeated values across the rows:
RoutePAR Start TimeDepotD1D2D3D4D5D6
1PAR-0073507603:00 TueDHLSTKKIRKCALDYEDINBURGHDUNDEEABERDEENDUNDEEABERDEEN


I want to format the row so that only the second time the value is repeated the cell is highlighted:
RoutePAR Start TimeDepotD1D2D3D4D5D6
1PAR-0073507603:00 TueDHLSTKKIRKCALDYEDINBURGHDUNDEEABERDEENDUNDEEABERDEEN


Can I achieve this through conditional formatting?

Many thanks
Sara
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
How about
+Fluff 1.xlsm
ABCDEFGHIJ
1RoutePAR Start TimeDepotD1D2D3D4D5D6
21PAR-0073507603:00 TueDHLSTKKIRKCALDYEDINBURGHDUNDEEABERDEENDUNDEEABERDEEN
31PAR-0073507603:00 TueDHLSTKKIRKCALDYEDINBURGHSTRILINGPERTHPERTHABERDEEN
41PAR-0073507603:00 TueDHLSTKKIRKCALDYEDINBURGHDUNDEEABERDEENSTIRLINGEDINBURGH
Main
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:J4Expression=COUNTIFS($E2:E2,E2)>1textNO
 
Upvote 0
Hey do you mean like this:

Book1
ABCDEFGHIJ
1RoutePARStart TimeDepotD1D2D3D4D5D6
21PAR-0073507603:00 TueDHLSTKKIRKCALDYEDINBURGHDUNDEEABERDEENDUNDEEABERDEEN
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:J2Expression=COUNTIF($A$2:A$2,A$2)=2textNO
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
One last thing - could I add an AND function to ignore the blank cells? At the moment when I extend the range, the first blank is left then the colour is applied to those thereafter when I would like them to remain unchanged as they are blank.
 
Upvote 0
How about
Excel Formula:
=AND(E2<>"",COUNTIFS($E2:E2,E2)>1)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,395
Messages
6,119,265
Members
448,881
Latest member
Faxgirl

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