Count how many scores in column B fall between 70 and 90 inclusive

公式

=COUNTIFS(B:B, ">=70", B:B, "<=90")

说明

COUNTIFS can point at the same range twice with two inequalities. Inclusive bounds use >= and <=.

步骤

  1. First criterion: greater than or equal to 70.
  2. Second criterion: less than or equal to 90.
  3. Change to > and < for exclusive bounds.

变体

Between two cells

E1 and F1 are the min and max so users can edit the window.

=COUNTIFS(B:B, ">="&E1, B:B, "<="&F1)

Also match a category

Adds a subject filter in column A.

=COUNTIFS(A:A, "Math", B:B, ">=70", B:B, "<=90")

Average in the band

Same window, mean instead of count.

=AVERAGEIFS(B:B, B:B, ">=70", B:B, "<=90")