I am trying to get some info for my lottery pick 6 to find out how long it has been since a lottery number hit with in a time frame of 6 months. This number can appear in any position with in a row BUT the Row that it is in corresponds to the date of that row with in a 6 month time period in my database.
Example, Lottery database
Cells A B C D E F G
1 7/27/2014 1 2 13 11 29 36
2 7/04/2014 7 15 21 32 33 53
3 6/25/2014 1 5 12 25 36 51
4 6/15/2014 4 10 17 21 22 49
4 5/30/2014 19 22 27 36 44 53
5 5/03/2014 1 2 3 14 25 46

Example, What I am trying to do for a reference Table
Last 6 months of Activity
Cells X Y Z
Number Last Date
9 1 7/27/2014
10 2 7/27/2014
11 3 5/03/2014
12 4 6/15/2014
13 5 6/25/2014

I am using xl 2010
Here is my code that I am working with [=IFERROR(LOOKUP(2,1/(L$2:N$31=$A2),$K$2:$K$31),"") ]. This code does not refer to the above examples it is from my workbook...

I would like for this to be able to go back for the last 6 months of drawings and also would like for the range of dates to be expandable so that when I update the drawings which I do on a weekly basis that I will not have to go in and adjust the formulas to accommodate the recently added cells. Any help that any one can or is willing to provide to me on this matter will be greatly appreciated and a thousand kudos in advance. Thank You,