S
Shu of AZ
In the data below, I need to be able to sort or divide, which ever term
represents having a formula or a macro automatically look at the data and
only allow the five most recent occurances of each row that have the unique
value in column 3. And, to make it more complicated, if there is not five
occurrances, then place the appropriate amount of rows after the last
occurrance to make it five. You can see, that the column with the value
OPTION has 9 occurances and need to be reduced to five by deleting everything
before 11/07/2006 where the value CRAFT only has 3 and needs to have 2 blank
rows added after 12/05/2006. In reality there are hundreds of these rows and
the amounts vary from 25 unique rows to sometime only 1. Any help would be
greatly appreciated. There is a header row I did not put in the example.
28 12/29/2006 Option D 6.00 0.00
55 12/18/2006 Option D 6.00 0.00
41 12/02/2006 Option D 6.00 0.00
56 11/18/2006 Option D 6.50 0.00
52 11/07/2006 Option D 8.00
19 10/22/2006 Option D 6.50 0.00
56 05/01/2006 Option T 7.50 0.00
74 04/21/2006 Option D 6.50 0.00
48 04/02/2006 Option A 8.50 4.80
48 12/18/2006 Take D 6.00 0.00
64 11/24/2006 Take D 6.50 0.00
54 10/22/2006 Take D 6.50 0.00
63 10/07/2006 Take D 6.00 0.00
63 08/14/2006 Take D 5.50 0.00
59 06/05/2006 Take D 6.00 0.00
52 05/13/2006 Take D 6.50 0.00
65 04/29/2006 Take D 6.00 0.00
63 04/01/2006 Take D 6.00 0.00
998 12/29/2006 Craft D 6.50 0.00
50 12/18/2006 Craft D 6.00 0.00
53 12/05/2006 Craft T 8.00 5.60
19 08/05/2006 New D 5.50 0.00
10 07/17/2006 New D 6.00
36 06/12/2006 New D 5.50 0.00
61 05/30/2006 New D 6.00 0.00
57 04/30/2006 New D 6.00 0.00
51 12/09/2006 Double Option D 6.50 0.00
55 11/17/2006 Double Option D 6.00
43 10/21/2006 Double Option D 5.50 0.00
53 08/28/2006 Double Option D 6.00 0.00
70 07/25/2006 Double Option D 6.00 0.00
50 07/10/2006 Double Option D 5.50 0.00
52 06/20/2006 Double Option D 5.50
47 06/06/2006 Double Option D 6.00 0.00
represents having a formula or a macro automatically look at the data and
only allow the five most recent occurances of each row that have the unique
value in column 3. And, to make it more complicated, if there is not five
occurrances, then place the appropriate amount of rows after the last
occurrance to make it five. You can see, that the column with the value
OPTION has 9 occurances and need to be reduced to five by deleting everything
before 11/07/2006 where the value CRAFT only has 3 and needs to have 2 blank
rows added after 12/05/2006. In reality there are hundreds of these rows and
the amounts vary from 25 unique rows to sometime only 1. Any help would be
greatly appreciated. There is a header row I did not put in the example.
28 12/29/2006 Option D 6.00 0.00
55 12/18/2006 Option D 6.00 0.00
41 12/02/2006 Option D 6.00 0.00
56 11/18/2006 Option D 6.50 0.00
52 11/07/2006 Option D 8.00
19 10/22/2006 Option D 6.50 0.00
56 05/01/2006 Option T 7.50 0.00
74 04/21/2006 Option D 6.50 0.00
48 04/02/2006 Option A 8.50 4.80
48 12/18/2006 Take D 6.00 0.00
64 11/24/2006 Take D 6.50 0.00
54 10/22/2006 Take D 6.50 0.00
63 10/07/2006 Take D 6.00 0.00
63 08/14/2006 Take D 5.50 0.00
59 06/05/2006 Take D 6.00 0.00
52 05/13/2006 Take D 6.50 0.00
65 04/29/2006 Take D 6.00 0.00
63 04/01/2006 Take D 6.00 0.00
998 12/29/2006 Craft D 6.50 0.00
50 12/18/2006 Craft D 6.00 0.00
53 12/05/2006 Craft T 8.00 5.60
19 08/05/2006 New D 5.50 0.00
10 07/17/2006 New D 6.00
36 06/12/2006 New D 5.50 0.00
61 05/30/2006 New D 6.00 0.00
57 04/30/2006 New D 6.00 0.00
51 12/09/2006 Double Option D 6.50 0.00
55 11/17/2006 Double Option D 6.00
43 10/21/2006 Double Option D 5.50 0.00
53 08/28/2006 Double Option D 6.00 0.00
70 07/25/2006 Double Option D 6.00 0.00
50 07/10/2006 Double Option D 5.50 0.00
52 06/20/2006 Double Option D 5.50
47 06/06/2006 Double Option D 6.00 0.00