This group is devoted to Microsoft's antispyware application - Windows
Defender.
Offhand, from my knowledge of Excel, it seems to me that your problem is
definitely solvable.
However, I'm going to try to avoid taking a stab at it myself, and see if I
can get you to the right group where folks with the proper expertise hang
out.
Here's a faq for posting Excel problems to a newsgroup:
http://www.cpearson.com/excel/newposte.htm
It has some useful links in it that may help you solve the problem on your
own.
Here's an upper level link to Office-related groups--choose carefully among
the Excel groups--if you can fit your issue into one other than "General
Questions" you may get a better response. It is NOT a good idea to just
post to all of them, or even two of them. Try posting to one, and if you
don't get a response after a few days, try another.
http://www.microsoft.com/office/community/en-us/FlyoutOverview.mspx#2
I'm interested in your issue--if you do post, you might reply back to this
thread with a link to your actual posted message. I can use that to try to
follow what happens--and if you don't get useful help, I can see what I can
think of myself.
If I understand your problem correctly, you want to build a table of unique
ID's with admission dates. There will be precisely one Unique ID (that's
what unique means!) but multiple admit dates. You want to determine how
many unique ID's have successive admit dates that are within two weeks of
the previous admit date. So--each time you come to an admit date, you test
it against the previous admit date for that ID, and if it is within two
weeks, you increment a counter--maybe one associated with that ID--so in the
end you have a table of ID's and counts of re-admissions.
This seems eminently do-able to me--but I'm not sure whether it takes Visual
Basic for Applications, or whether it can be done purely with Excel
functions. I suspect it can be done within Excel, but it is not something
I've done before.