[Previously titled, "How to create something like:COUNTIF(A1:J10, AND(OR(Sheet1!A1=1, Sheet2!A1=1), Sheet3!=1))"]
Sorry, that title [is probably] was terrible, but I'm having trouble describing what I need to do, and that imaginary function is pretty close.
I have many sheets of binary data, and several sheet of "designed" data (also binary), all of which are the same range. I need to test how well different combinations of the data sheets match the designed data.
I can do this for any single test with a helper sheet. On the helper sheet, I create an IF statement in each cell in the range that uses an OR to check if any of the data sheets have a 1, and then uses AND to check that against the designed sheet. E.g., =IF(AND(OR(Sheet1!A1=1, Sheet2!A1=1, Sheet3!A1=1), Design!A1=1), 1, 0). And then since I know how many positive cells a sheet should contain (all the designed sheets have the same number of positive cells), I just sum the helper sheet.
The attached example workbook shows what I'm trying to accomplish for a single case, using the method I described.
The problem is that I need a way to do it at scale, since I have a few dozen data sheets that need to be tested in different combinations and a handful of designed sheets. So the total workload here is possibly a couple thousand iterations of this. The only information I need for each iteration is the sum on the helper sheet (I don't need to know which cells in each test fail to match).
Any help is greatly appreciated. I can work with VB code if that's the best way to do this. Thank you for any ideas!
Bookmarks