That error will occur if the data you posted in your sample file are different from those data giving you the error.
I tested that code on your data as you posted and it worked just fine.
It does require your "dates" are numbers (even if formatted differently) otherwise that code will error and the concept of what is "sequential" and hence the meaning of your question becomes rather blurred.
Here's a minor variation of the code that doesn't require data input in colA from A3 downward to be integers. It shouldn't give the same error, but since I don't know the specific structure of your data I consequently can't be sure this code will give the result you want either.
Apposite to my original code, you might check that, if you reformat ColumnA as "general", then do all of your "dates" then appear as positive integers from about 28,000 to 40,000?
Bookmarks