I'm attempting to make a crude food intolerance matrix in excel. The matrix itself is simple enough, however the formula for ascertaining the number of instances where symptoms were found is problematic.
In the image below I have a matrix of ingredients and meals. As you can see I'm flagging ingredients in meals on the column and marking at the bottom if I felt discomfort.
On the right hand side I need a formula which will provide either a value such as a ratio of times experienced discomfort against included in a meal (2:2, twice experienced discomfort out of two meals where the ingredient was included), a percentage, or a true false value. Examples below.
I have attempted:
- hlookup good for ranges but not for counting against another row
- match
=match(TRUE, B6:D6)
which returns true for every cell with a checkbox, empty or not. - If and AND
=IF(AND(C11=TRUE,C12=TRUE),"TRUE","FALSE")
However this only counts for one comparison. I would have to make a whole separate matrix to count these. - If I try
=countif(A11:C11,TRUE)/countif(A12:C12,TRUE)
it expresses as 100% where there has been an ingredient shared across two meals where only one caused discomfort (obvs not what I'm looking for)