(Edit] Just came back to this after composing my post and saw your later post.
Hi Skip, well if I filter on the Conditional Formatting colour I can see the MRN's that do have a matching diagnosis anywhere/somewhere.
I thought of using SubTotals to separate each MRN group but it appears as if I have to convert the Table back to a Range to permit this.
I then wondered if I could somehow use a 'Visible Cells' formula to count the rows where the word "Total" now appears:
So, what I've come up with is:
Apply Conditional Formatting to Column D - Diagnosis Code
Filter Column D on the Conditional Formatting colour
Insert SubTotals based on change on MRN, (SUM on final Column Month A&E Readmissions, but I'm not sure if that's relevant)
And then use a formula to count those rows that contain "Total"
=COUNTIF(A2:A264,"*Total")
This will give the sub-cohort of those who reattended "for the same reason".
Select all from Column D
Apply the SubTotals again and this will give the total number of patients who reattended.
A bit convoluted but it appears to be a full solution
![[dazed] [dazed] [dazed]](/data/assets/smilies/dazed.gif)
.
Actually I've got a bit more refining to do as it's possible that a person could have attended more than once in this week as well. Grrr, I think I've got the measure of it though.
Many thanks,
D€$