Spreadsheet: 732620d1621062937-using-countifs-with-specific-criteria-example
Sheet: Sheet1 (2)

Test | Birth Date | Age | Gender
sample 37 | 2007-07-27 00:00:00 | 13 | female |  | Count of Age | Column Labels
sample 13 | 2001-04-20 00:00:00 | 20 | female |  | Row Labels | female | male | Grand Total
sample 9 | 2006-05-06 00:00:00 | 15 | male |  | 11-20 | 7 | 6 | 13
sample 15 | 2018-02-11 00:00:00 | 97 | male |  | 21-30 | 6 | 7 | 13
sample 15 | 2018-07-26 00:00:00 | 92 | male |  | 31-40 | 6 | 10 | 16
sample 39 | 1980-11-29 00:00:00 | 40 | male |  | 41-50 | 10 | 6 | 16
sample 54 | 2006-12-13 00:00:00 | 14 | female |  | 51-60 | 13 | 10 | 23
sample 1 | 1992-01-03 00:00:00 | 29 | female |  | 61-70 | 5 | 4 | 9
sample 45 | 2013-02-05 00:00:00 | 64 | male |  | 71-80 | 1 | 2 | 3
sample 44 | 1999-05-13 00:00:00 | 22 | female |  | 81-90 | 1 | 1 | 2
sample 58 | 2011-09-21 00:00:00 | 81 | male |  | 91-100 | 1 | 4 | 5
sample 31 | 1960-11-08 00:00:00 | 60 | male |  | Grand Total | 50 | 50 | 100
sample 7 | 1957-11-02 00:00:00 | 63 | female
sample 66 | 2000-06-09 00:00:00 | 20 | female
sample 25 | 2018-10-03 00:00:00 | 54 | female
sample 33 | 2014-01-05 00:00:00 | 76 | male
sample 10 | 1966-06-17 00:00:00 | 54 | female |  |  |  | =COUNTIFS($C$2:$C$101,F4,$D$2:$D$101,G3)
sample 37 | 2014-05-26 00:00:00 | 99 | male
sample 11 | 1993-12-18 00:00:00 | 27 | male
sample 35 | 1967-08-19 00:00:00 | 53 | female
sample 36 | 1970-05-03 00:00:00 | 51 | male
sample 35 | 1980-04-30 00:00:00 | 41 | male
sample 24 | 2005-07-04 00:00:00 | 15 | male
sample 3 | 1989-09-21 00:00:00 | 31 | female
sample 48 | 1998-10-31 00:00:00 | 22 | female
sample 31 | 2006-02-03 00:00:00 | 15 | male
sample 5 | 2014-02-18 00:00:00 | 63 | male
sample 31 | 1991-01-28 00:00:00 | 30 | female
sample 46 | 1979-05-11 00:00:00 | 42 | female
sample 58 | 1969-12-18 00:00:00 | 51 | female
sample 15 | 1957-08-21 00:00:00 | 63 | female
sample 57 | 1961-02-12 00:00:00 | 60 | female
sample 44 | 2005-04-27 00:00:00 | 16 | female
sample 54 | 2003-12-25 00:00:00 | 17 | male
sample 51 | 1965-12-27 00:00:00 | 55 | male
sample 15 | 1990-07-04 00:00:00 | 30 | female
sample 22 | 1957-10-10 00:00:00 | 63 | male
sample 5 | 1976-03-25 00:00:00 | 45 | female
sample 19 | 2017-12-04 00:00:00 | 64 | female
sample 64 | 1964-03-12 00:00:00 | 57 | female
sample 31 | 2021-03-07 00:00:00 | 73 | male
sample 57 | 1964-10-15 00:00:00 | 56 | male
sample 9 | 1968-12-11 00:00:00 | 52 | female
sample 62 | 1981-08-11 00:00:00 | 39 | male
sample 38 | 2006-01-13 00:00:00 | 15 | male
sample 62 | 1971-09-11 00:00:00 | 49 | female
sample 9 | 1981-03-07 00:00:00 | 40 | female
sample 19 | 1978-08-11 00:00:00 | 42 | female
sample 9 | 1960-10-07 00:00:00 | 60 | female
sample 61 | 1995-11-11 00:00:00 | 25 | male
sample 40 | 1973-07-18 00:00:00 | 47 | female
sample 35 | 2013-06-13 00:00:00 | 98 | female
sample 53 | 1971-06-24 00:00:00 | 49 | male
sample 59 | 1973-12-18 00:00:00 | 47 | female
sample 21 | 1997-02-14 00:00:00 | 24 | male
sample 58 | 2009-09-16 00:00:00 | 11 | female
sample 61 | 1971-03-13 00:00:00 | 50 | male
sample 4 | 1960-01-02 00:00:00 | 61 | male
sample 28 | 2016-01-10 00:00:00 | 93 | male
sample 27 | 1992-10-08 00:00:00 | 28 | male
sample 25 | 1980-03-02 00:00:00 | 41 | male
sample 50 | 2019-03-18 00:00:00 | 88 | female
sample 56 | 1994-05-27 00:00:00 | 26 | male
sample 65 | 1980-12-29 00:00:00 | 40 | female
sample 10 | 1997-01-13 00:00:00 | 24 | male
sample 50 | 1982-03-01 00:00:00 | 39 | male
sample 50 | 2017-01-25 00:00:00 | 68 | female
sample 2 | 1964-07-26 00:00:00 | 56 | male
sample 34 | 2000-09-28 00:00:00 | 20 | male
sample 19 | 2009-10-14 00:00:00 | 11 | female
sample 17 | 2016-02-10 00:00:00 | 70 | female
sample 55 | 1977-11-19 00:00:00 | 43 | female
sample 47 | 1982-10-27 00:00:00 | 38 | female
sample 29 | 1984-12-06 00:00:00 | 36 | male
sample 52 | 1984-02-13 00:00:00 | 37 | male
sample 62 | 1961-10-28 00:00:00 | 59 | male
sample 1 | 1968-07-16 00:00:00 | 52 | female
sample 24 | 1990-03-11 00:00:00 | 31 | male
sample 49 | 1965-02-17 00:00:00 | 56 | male
sample 36 | 1976-02-01 00:00:00 | 45 | female
sample 58 | 1970-05-12 00:00:00 | 51 | male
sample 4 | 1985-07-05 00:00:00 | 35 | male
sample 8 | 2019-06-13 00:00:00 | 73 | female
sample 7 | 1986-01-17 00:00:00 | 35 | female
sample 55 | 1983-11-01 00:00:00 | 37 | male
sample 14 | 1986-08-23 00:00:00 | 34 | male
sample 21 | 1964-10-18 00:00:00 | 56 | female
sample 54 | 1964-11-28 00:00:00 | 56 | male
sample 8 | 1976-10-22 00:00:00 | 44 | male
sample 54 | 1983-12-22 00:00:00 | 37 | male
sample 56 | 1972-10-30 00:00:00 | 48 | female
sample 65 | 1990-09-27 00:00:00 | 30 | female
sample 51 | 1991-09-18 00:00:00 | 29 | male
sample 37 | 1973-10-10 00:00:00 | 47 | male
sample 23 | 1963-08-19 00:00:00 | 57 | female
sample 43 | 1983-12-28 00:00:00 | 37 | female
sample 51 | 1973-07-30 00:00:00 | 47 | female
sample 65 | 1965-09-08 00:00:00 | 55 | male
sample 59 | 2018-08-30 00:00:00 | 54 | female
sample 62 | 1969-05-22 00:00:00 | 51 | female