Here's the data that I have. (I've also created a workbook with data that's similar to my database, but with random values). Essentially, what I need is to see if there is a date and time overlap , matching the meter ID,(Sheet 1 has "start date", "Start Time", End date", and "end time". Sheet two has a start time, and every half hour incremented for 180 days) If so, I want to see the tracking number in the space (1-12) where it exists.


Sheet 1
a b c d e f g h
1 tracking # meter id START DATE END DATE START TIME END TIME SPACES SPACES
2 4-14-03-0145 411441 3/1/14 3/4/14 0:00 16:00 2-9,12 2,3,4,5,6,7,8,9,12
3 4-14-05-0151 411439 3/2/14 3/3/14 8:00 16:00 2-8,12 2,3,4,5,6,7,8,12
4 4-14-04-0115 411441 3/7/14 3/15/14 7:00 15:00 2-3,7 2,3,7
5 4-14-09-0045 411441 3/17/14 3/19/14 6:00 19:00 12 12
6 6-14-03-191 411123 3/1/14 3/4/14 8:00 16:00 2-3 2,3
7 5-14-07-0012 411441 4/1/14 4/4/14 9:00 17:00 1-5 1,2,3,4,5
8 3-14-09-0111 411222 3/1/14 3/4/14 8:00 16:00 1-9 1,2,3,4,5,6,7,8,9
9 5-14-09-0113 411441 5/1/14 5/7/14 8:00 16:00 2-9,12 2,3,4,5,6,7,8,9,12
10 1-14-11-0121 411045 3/1/14 3/4/14 8:00 16:00 11-12 11,12

Sheet 2
3/1/2014 0:00 3/1/2014 0:30 3/1/2014 1:00 3/1/2014 1:30 3/1/2014 2:00 3/1/2014 2:30 3/1/2014 3:00
1
2 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
3 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
4 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
5 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
6 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
7 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
8 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
9 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145
10
11
12 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145 4-14-03-0145