=AVERAGEIF(B2:B5,"<8") gets the average of all values less than 23
Input the formula: =AVERAGEIF(B2:B5,"<8"). Press Enter to get the result.
Referenced from Excel Help