what is the function to countif in MS Access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

what is the function to countif in MS Access? To clarify I would like to
count grades and break them out like 4 ..5's or 3 ...2's etc
 
You can use Sum with IIf that return 1 if a criteria is met

NewFieldName: Sum(IIf([Grade] = 4 , 1 , 0))

NewFieldName: Sum(IIf([Grade] In (4,5) , 1 , 0))

NewFieldName: Sum(IIf([Grade] Between 4 And 6 , 1 , 0))
 
Back
Top