Forum Discussion
Identify ID's meeting multiple criteria (Condition#1: Corn,Tomato - Cndition#2 starts with "P"
- May 21, 2017
Hi, rcriceinc
For Test Condition 1, apply Detlef_Lewin 's formula
=IF(SUM(COUNTIFS([ID],[@ID],[Condition],{"Tomato";"Corn"}))>1,"T","F")For Test Condition 2, use this.
=IF(COUNTIFS([ID],[@ID],[Condition],"P*")>=1,"T","F")
Hope both will solve your problem.
- Detlef_LewinMay 20, 2017Silver Contributor
Sorry, you were not very clear.
=AND(OR(A2="Corn",A2="Tomato"),LEFT(A2)="P")
- rcriceincMay 20, 2017Copper Contributor
Don't know how to be more clear. The "And" in test #1 should have been clear. Both conditions must exist before a "T" result is returned. If both conditions are not true, then return "F".
Test#1 = ID = "Corn" and "Tomato"
test condition should return a "T" or "F" result (Boolean is OK)Treat test#2 seperately using the same data.
EX:
ID#1 occurs multiple times with multiple conditions.
Return "F" unless an ID has instances with both Corn and Tomato
- Logaraj SekarMay 20, 2017Steel Contributor
Just see the attached file.
I corrected formula in D column only.
=AND(OR(B2="Corn",B2="Tomato",LEFT(B2,1)="P"))
Confirm whether i understood your question. Hope, I can solve next one too.