I have table that looks like the one given below
. A B C D 1 No TC Description DTC? TP 2 1 Description 1 Yes 1 3 2 Description 2 No 1,2 4 3 Description 3 Yes 2,1 5 4 Description 4 No 3 6 5 Description 5 Yes 1,4 7 DTC-Yes? TP No of TC 8 DTC-Yes 1 ? 9 DTC-Yes 2 ? 10 DTC-Yes 3 ? 11 DTC-Yes 4 ?
The data that I have is from A1:D6.
I need to fill columns D8:D11 (that I have marked with ? above). In each of these cells, excel should count the number of rows in the data that match for a "Yes" in C2:C6 and also match the TP (C8:C11) number in D2:D6. This column contains comma seperated numbers. For example, in D8 I should get the value 3 since there are three rows with "Yes" in column C2:C6 and with 1 present in D2:D6.
I am able to get the number of rows that match with the TP number using the formula {=SUM(LEN(D2:D6)-LEN(SUBSTITUTE(D2:D6,C8,"")))/LEN(C8)}. This gives me 4 in D8. However I am not able to add the second criteria of "Yes" to this formula to get the result of 3 in D8.
The input from people would be in C8:11. So the number added in this cell should be used for the partial criteria matching.
Any help to solve this would be appreciated.
Bookmarks