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))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top