7. The =COUNTIF function
3: Calculate the count of students in your cohort by sex
- In your "metadata" sheet, find the numeric value that corresponds to being male
- In your "calculations" worksheet, locate the appropriate cell to enter the count of students who are male:
- With your mouse, select the cell in which you want to enter the count of students who are male.
- In the formula bar, type the following:
=countif(
- Click on the "Data" worksheet down the bottom left of the screen
- With your mouse, select the data range (column of data) for the variable sex (e.g., cells C2:C32)
- Type the following into the formula bar:
,1)
This will complete the formula: =countif([cell range],[criteria for being male])
- Press the Enter key on your keyboard
You have now calculated the count of males within your student cohort. Now SAVE your workbook!
Did you all get the same answer?
TIME TO PRACTICE:
Follow the same instructions as above to calculate the count of students in your cohort who are female.
(HINT: Remember to check your "metadata" worksheet to find the numeric value that corresponds to being female to use in the formula)
How did you go?