How do I add conditional formatting for a row in my table if the value in Date column is not one day greater than one row above?

Mr. Snrub

Board Regular
Joined
May 22, 2005
Messages
150
Office Version
  1. 365
Platform
  1. Windows
I have a large Excel table with a Date column. The values in Date column range from 6/1/2003 to today. How do I add conditional formatting that will surround a table row with a huge red border (or a highlight in yellow) if the current value of Date is not exactly one day greater than the previous row's date? This way I can tell if there are either some missing or duplicate rows in the table.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi there. You can do this with conditional formatting:
Book1
A
1
206/01/2003
307/01/2003
408/01/2003
509/01/2003
610/01/2003
711/01/2003
813/01/2003
914/01/2003
1001/03/2020
1102/03/2020
1203/03/2020
Sheet1
Assuming your data is as shown, put this conditional format in A3 onwards:=$A2+1<$A3
and set the range it applies to to:=$A$3:$A$5000 (replace 5000 with last row)
.
1583159866437.png
 
Upvote 0
To highlight duplicate rows as well as missing dates try
=$A2+1<>$A3
 
Upvote 0
Ah yes, fluff is right (as usual) - I missed the 'or duplicate' bit, so use his formula in the conditional formatting.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,130
Members
453,021
Latest member
Justyna P

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