R
robboll
I am trying to set up a VBA routine (query) that counts the number of
days
HERE vs AWAY. The sample events start (e.g., a_s) and end (e.g.,
a_e) at random dates within the period: July 1 thru Aug 6
Sample Events:
a_s: 5-Jul
a_e: 21-Jul
c_s: 5-Jul
c_e: 21-Jul
e_s: 6-Jul
e_e: 24-Jul
g_s: 4-Jul
g_e: 20-Jul
i_s: 6-Jul
i_e: 20-Jul
k_s: 26-Jul
k_e: 4-Aug
All start and stop dates for all events are all on the same row like:
member, a_s, a_e, c_s, c_e, e_s, e_e, etc.
The routine should see that events a,c,e,g, and I overlap, and that
event g (July 4) is the earliest of the overlapping events. Event e
(July 24) is the latest of the overlapping events accounting for 21
days. It should also see that event k (July 26 thru August 4)
accounts for 10 days. Total Event days: 31 (Away)
Total days of period Jul 1 thru Aug 6 = 37 days
37 - 31 (Away) = 6 (Here)
All event periods are "AWAY" the rest are considered "HERE"
Graphing these dates out (the hard way) for the period July 1 thru Aug
6 I come up with:
AWAY: 31 DAYS
HERE: 6 DAYS
Is there a VBA routine or an array that can handle this routine in a
query? Any help greatly appreciated!!!
I hope this clears up what I am trying to do conceptually. Appreicate
any help with this!
RBollinger
days
HERE vs AWAY. The sample events start (e.g., a_s) and end (e.g.,
a_e) at random dates within the period: July 1 thru Aug 6
Sample Events:
a_s: 5-Jul
a_e: 21-Jul
c_s: 5-Jul
c_e: 21-Jul
e_s: 6-Jul
e_e: 24-Jul
g_s: 4-Jul
g_e: 20-Jul
i_s: 6-Jul
i_e: 20-Jul
k_s: 26-Jul
k_e: 4-Aug
All start and stop dates for all events are all on the same row like:
member, a_s, a_e, c_s, c_e, e_s, e_e, etc.
The routine should see that events a,c,e,g, and I overlap, and that
event g (July 4) is the earliest of the overlapping events. Event e
(July 24) is the latest of the overlapping events accounting for 21
days. It should also see that event k (July 26 thru August 4)
accounts for 10 days. Total Event days: 31 (Away)
Total days of period Jul 1 thru Aug 6 = 37 days
37 - 31 (Away) = 6 (Here)
All event periods are "AWAY" the rest are considered "HERE"
Graphing these dates out (the hard way) for the period July 1 thru Aug
6 I come up with:
AWAY: 31 DAYS
HERE: 6 DAYS
Is there a VBA routine or an array that can handle this routine in a
query? Any help greatly appreciated!!!
I hope this clears up what I am trying to do conceptually. Appreicate
any help with this!
RBollinger