Cactus1993
asked on
Need formula for determining number of consecutive dates.
I have a column of dates, of which I need 2 formulas ... one for the maximum consecutive days listed, and the other for the current consecutive days.
Example spreadsheet attached. Thanks!
Consecutive.xlsx
Example spreadsheet attached. Thanks!
Consecutive.xlsx
ASKER
Oh boy -- not sure what all this is, or how to use it. I should have been more specific and asked if this could be done in an Excel formula. Not sure how to use your answer (but I'm sure it works!)
As for the longest current Consecutive Days, it really is 3 (06/27, 06/28, 06/29.) The longest consecutive days is 8. Thanks!
As for the longest current Consecutive Days, it really is 3 (06/27, 06/28, 06/29.) The longest consecutive days is 8. Thanks!
There is 4 : (1/23 - 1/24), (6/11-6/12-6/13), (6/18-6/25), and (6/27-6/29).
Those above are VBA codes. I don't think there is any formula or combination of it in Excel that you can calculate those. Only choice is use VBA. You just insert above into a VBA module; and afterwards, you have 2 formulas that can calculate the way you want it.
Those above are VBA codes. I don't think there is any formula or combination of it in Excel that you can calculate those. Only choice is use VBA. You just insert above into a VBA module; and afterwards, you have 2 formulas that can calculate the way you want it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No Comments added further and OP wanted formula based solution.
ASKER
Thanks, Shums. Perfect answer. Unfortunately I had to travel out of town right after I asked this question. Thanks again!
Open in new window
To use it: =ConsecDays(A5:A25) and =LongestConsecDays(A5:A26)
Note: Consecutive Days is 4 not 3.