The other problem I noticed with your formula is you may be missing the quotations around the M.
=IF(ISNUMBER(MATCH(1,N12,0)),(COUNTIF(D12,"M")),0)
after you copy and paste that into all of your cells. You can do a sum function on all to get a count of all males who were present.
Or alternatively you can use this formula;
=COUNTIFS(D2:D37,"M",N2:N37,1)
The COUNTIFS function was introduced in Excel 2007. It allows you to specify several criteria. In this example D2:D37 is the range of cells to look for a text value of M. And then it examine ranfe N2:N37 for a 1. If both of the criteria are true it adds to a count. It will examine the entire range you specify. You can change the formula easily to point to a different range of cells or the value you are looking for.
Bookmarks