Hello,
I am trying to figure out a IF formula to say how may criteria mach with some codes. I have made a simple graph. Goal is to find a patient with two Codes specific codes, which is 96365 and J0984
[TABLE="class: grid, width: 319"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Location[/TD]
[TD]Patient ID[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]1[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]2[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]2[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]4[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]3[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]3[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]5[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]6[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]6[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]7[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]7[/TD]
[TD]J0987[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]9[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]10[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]10[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]11[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]12[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]12[/TD]
[TD]J0984[/TD]
[/TR]
</tbody>[/TABLE]
Results that i want.
[TABLE="class: grid, width: 132"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Hospital 1[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD="align: right"]3[/TD]
[/TR]
</tbody>[/TABLE]
I have tried to use counties, but with that it will count each rows, which will make hospital 1 to have 4, when i want to see how many patients, so we see 2 patients match this criteria
I am trying to figure out a IF formula to say how may criteria mach with some codes. I have made a simple graph. Goal is to find a patient with two Codes specific codes, which is 96365 and J0984
[TABLE="class: grid, width: 319"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Location[/TD]
[TD]Patient ID[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]1[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]2[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]2[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]4[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]3[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]3[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 1[/TD]
[TD]5[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]6[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]6[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]7[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]7[/TD]
[TD]J0987[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]9[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]10[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]10[/TD]
[TD]J0984[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]11[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]12[/TD]
[TD]96365[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD]12[/TD]
[TD]J0984[/TD]
[/TR]
</tbody>[/TABLE]
Results that i want.
[TABLE="class: grid, width: 132"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Hospital 1[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Hospital 2[/TD]
[TD="align: right"]3[/TD]
[/TR]
</tbody>[/TABLE]
I have tried to use counties, but with that it will count each rows, which will make hospital 1 to have 4, when i want to see how many patients, so we see 2 patients match this criteria