stevembe
10-15-2015, 08:43 AM
I originally posted this on a different Excel forum but received no responses so am thinking this can not be achieved. I know very little VBA but would appreciate it if anybody can tell me if the following can be achieved with VBA:
In column J I have a number of dates, some consecutive, some with a date(s) missing in a week. I am trying to work out how to identify the dates that are all within the same week, week commencing Monday to Sunday and count each as 1 occurrence and for the counting to reset when there is a change in the detail of column A which is employee number.
For example if I have:
12 Oct 15
13 Oct 15
14 Oct 15
15 Oct 15
16 Oct 15
This counts as 1 Occurrence
12 Oct 15
13 Oct 15
14 Oct 15
Also would count as 1 occurrence
12 Oct 15
13 Oct 15
15 Oct 15
16 Oct 15
Also would count as 1 occurrence.
In column K I would also like to total these occurrences up for each employee.
Thanks for taking the time to read.
In column J I have a number of dates, some consecutive, some with a date(s) missing in a week. I am trying to work out how to identify the dates that are all within the same week, week commencing Monday to Sunday and count each as 1 occurrence and for the counting to reset when there is a change in the detail of column A which is employee number.
For example if I have:
12 Oct 15
13 Oct 15
14 Oct 15
15 Oct 15
16 Oct 15
This counts as 1 Occurrence
12 Oct 15
13 Oct 15
14 Oct 15
Also would count as 1 occurrence
12 Oct 15
13 Oct 15
15 Oct 15
16 Oct 15
Also would count as 1 occurrence.
In column K I would also like to total these occurrences up for each employee.
Thanks for taking the time to read.