Write a Macro to retain rows based on certain criteria

J

Jean

Hello,

i have couple hundred thousands records in excel 2007; here is a sample:

Account# Time of Call Reason for Calling
1 06/01/08 13:30 xxx
2 06/01/08 13:35 yyy
1 06/02/08 14:45 zzz
1 06/06/08 11:55 xxx
2 06/06/08 13:05 yyy
1 06/06/08 12:00 xxx
1 06/07/08 11:55 xxx
1 06/08/08 11:55 xxx
1 06/09/08 11:55 zzz
1 06/10/08 11:55 xxx
1 07/01/08 12:15 yyy
2 07/01/08 12:05 xxx

Basically, i am looking to keep rows where we have received 7 or more calls
within 15 days from the same account number. Is it possible to write a macro
to only meet this criteria?

The result of the macro would be:
1 06/01/08 13:30 xxx
1 06/02/08 14:45 zzz
1 06/06/08 11:55 xxx
1 06/06/08 12:00 xxx
1 06/07/08 11:55 xxx
1 06/08/08 11:55 xxx
1 06/09/08 11:55 zzz
1 06/10/08 11:55 xxx

Thanks for any help!
 
M

Mike H.

But what if you delete data from Account #2 because they only had 12 calls
and then tomorrow they place 3 more calls, all within a new 15-day window. I
think perhaps a pivottable could do this for you too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top