Consecutive dates excel

sjurawan

New Member
Joined
Nov 2, 2017
Messages
3
Hi,

Having some problems trying to work out a formula to count incidents of absence. I have a report which gives me a list a column of names and next to it dates they have been absent. I want to work out the incidences of absence, e.g Johan - 01/01/2017, 02/01/2017, 03/01/2017, 10/02/2017 in this example Johan has been absent for 4 days but it was only 2 incidences of absence.

If you need an example workbook I can upload one, thank you for any help you can give me :)

Kind Regards
Sam
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Sam,

My suggestion would be to use a "helper" sheet. This sheet would perform checks on each set of dates and record either a 0 or a 1, depending on whether that date should be counted or not. The original data sheet would then sum the values in the helper sheet to get the number of non-consecutive absences. The helper sheet could then be hidden if you wished. I cannot yet post attachments, but would be happy to e-mail an example to you if you'd like.
 
Upvote 0
My suggestion would be to use SUMPRODUCT. In my example, I am using American style dates.


Excel 2010
ABCD
11/1/20172
21/2/2017
31/3/2017
42/10/2017
Sheet1
Cell Formulas
RangeFormula
D1=SUMPRODUCT(--(A1:A10<>A2:A11-1),--(A1:A10<>""))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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