AVERAGEIF function returns the average of all cells in a range that meet given criteria.
= AVERAGEIF (range, criteria, [average_range])range - The range of cells that you want evaluated by criteria.
criteria - determines which cell to add.
[average_range] - This parameter is used when you want to add other than those specified in the range argument.
Calculate an average number of hours worked by male workers.