Date gaps between rows (unknow size array?)

W

winnie

Please help me with some idea for my difficulty of
finding the date gaps between unknown of number
of rows in the two columns (by days) for each
concatenation
of "LastName + FirstName + DOB" as a unique identifier.
For each "LName" + "FName" + "DOB", there are one or
two or many plans (unknown number of start and end dates
for each person), I need to use the following row of
StateDate minus EndDate from the previous row to find out
how many gaps each person has and post the result to
another column called "Gap#" and the date difference by
days into another column "GapDays", If "Gap#" >= 2
for "LName" + "FName" + "DOB", delete; if "Gap#" <= 1
while "GapDays">45, also delete; then do the same thing
for next person and so on. Please advise. The data sheet
looks like the following

LName FName DOB PType SDate EDate Gap# GapDays
A a 1/1/2000 A 1/1/2000 3/31/2000
A a 1/1/2000 B 4/5/2000 5/31/2000
A a 1/1/2000 C 1/1/2002

B b 2/2/1950 B 1/15/1999 12/20/2002



Thank you for kind help.

Winnie Zhou
 

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

Similar Threads


Top