Are the values in D3 and D4 actual dates? Can you post a file that has nothing but row 17? The code works fine in my test workbook..... The code can be run anytime D3 or D4 changes, but let's get the bugs worked out first.