Have a six-column Excel worksheet that have approximately 26,000 records in columns A through C and 28,000 records in columns D through F. Columns A through C is the admit and discharge dates for the employees at Hospital 1 and columns D through F are the admit and discharge dates for employees at Hospital 2. (Note, the data is from two difference sources and I consolidated to one worksheet)
Obj: 1) Determine if the employees that were admitted to hospital 1 also had an admittance to hospital 2 and there were overlapping dates of service. For example, EmpID 1046 had an overlapping dates of service and would require additional review because the employee cannot be admitted two places within the same time frame!
Obj: 2) Determine if the employees that were admitted to hospital 1 and also to hospital 2 and there were no overlapping dates of service. For example, EmpID
1072 would fit this category.
Currently, For objective 1, I have experimented with a nested if statement in column "G" along the lines of
=If(AND(sumproduct((EmpID1=A2)*(EmpID2=A2),(E2>=B2,F2<=C2)),"Yes","No")).
So far, I haven't been successful.
The format of the data is similar to the following;
EmpID---AdmitDt---DischDt---EmpID---VisitBeginDt--VisitEndDt
1046----1/1/08----1/6/08----1032----1/2/08--------1/3/08
1052----2/1/08----2/15/08---1032----1/5/08--------1/6/08
1052----2/18/08---2/22/08---1046----1/5/08--------1/6/08
1061----1/15/08---1/17/08---1046----2/1/08--------2/2/08
1061----1/25/08---1/28/08---1052----1/15/08-------1/20/08
1072----1/12/08---1/15/08---1052----1/30/08-------2/5/08
----------------------------1061----1/26/08-------1/26/08
----------------------------1072----2/15/08-------2/17/08
Any insight as to a resolution is sincerely appreciated.
Thanks in advance.
Obj: 1) Determine if the employees that were admitted to hospital 1 also had an admittance to hospital 2 and there were overlapping dates of service. For example, EmpID 1046 had an overlapping dates of service and would require additional review because the employee cannot be admitted two places within the same time frame!
Obj: 2) Determine if the employees that were admitted to hospital 1 and also to hospital 2 and there were no overlapping dates of service. For example, EmpID
1072 would fit this category.
Currently, For objective 1, I have experimented with a nested if statement in column "G" along the lines of
=If(AND(sumproduct((EmpID1=A2)*(EmpID2=A2),(E2>=B2,F2<=C2)),"Yes","No")).
So far, I haven't been successful.
The format of the data is similar to the following;
EmpID---AdmitDt---DischDt---EmpID---VisitBeginDt--VisitEndDt
1046----1/1/08----1/6/08----1032----1/2/08--------1/3/08
1052----2/1/08----2/15/08---1032----1/5/08--------1/6/08
1052----2/18/08---2/22/08---1046----1/5/08--------1/6/08
1061----1/15/08---1/17/08---1046----2/1/08--------2/2/08
1061----1/25/08---1/28/08---1052----1/15/08-------1/20/08
1072----1/12/08---1/15/08---1052----1/30/08-------2/5/08
----------------------------1061----1/26/08-------1/26/08
----------------------------1072----2/15/08-------2/17/08
Any insight as to a resolution is sincerely appreciated.
Thanks in advance.