# Using CF to find repeat patient

1. ## Using CF to find repeat patient

I need to find patients who discharged in Sep 2019 and readmitted within 30 days from the last discharge date.
Patients can be readmitted multiple times in Sep.

Thank you very much!

2. ## Re: Using CF to find repeat patient

Perhaps try this as your conditional formatting formula:

=AND(MONTH(C2)=9,VLOOKUP(A2,A3:B\$51,2,0)-C2<=30)

Beth.

3. ## Re: Using CF to find repeat patient

=aggregate(15,6,b3:\$b\$51/(a3:\$a\$51=a2)/(match(c2,\$p\$1:\$q\$1)=1)/(b3:\$b\$51>c2),1)-c2<=30

4. ## Re: Using CF to find repeat patient

Perhaps try this as your conditional formatting formula:

=AND(MONTH(C2)=9,VLOOKUP(A2,A3:B\$51,2,0)-C2<=30)

Beth.
Hi,

Thanks for the solution.

For example, same patient:
1. admission 25/8, discharge 2/9 (no need to be highlighted)
2. admission 5/9, discharge 10/9 (need to be highlighted)

5. ## Re: Using CF to find repeat patient

Maybe this?

=AND(MONTH(C2)=9,VLOOKUP(A2,A3:B\$51,2,0)-C2<=30,COUNTIFS(A\$2:A2,A2,C\$2:C2,">="&DATE(2019,9,1),C\$2:C2,"<="&DATE(2019,9,30))>1)

It's a bit complicated and there is more than likely an easier way...

Beth.

6. ## Re: Using CF to find repeat patient

Maybe this?

=AND(MONTH(C2)=9,VLOOKUP(A2,A3:B\$51,2,0)-C2<=30,COUNTIFS(A\$2:A2,A2,C\$2:C2,">="&DATE(2019,9,1),C\$2:C2,"<="&DATE(2019,9,30))>1)

It's a bit complicated and there is more than likely an easier way...

Beth.
Thank Beth!

But the formula is not working well............

7. ## Re: Using CF to find repeat patient

Assuming the conditional formatting is for column A, try the following:
Formula:
`Please Login or Register  to view this content.`

Let us know if you have any questions.

8. ## Re: Using CF to find repeat patient

Originally Posted by JeteMc
Assuming the conditional formatting is for column A, try the following:
Formula:
`Please Login or Register  to view this content.`

Let us know if you have any questions.
Thank you very much JeteMc! The formula works!

9. ## Re: Using CF to find repeat patient

You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1