set a criterion using a letter

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

Guest

Hi All:

Could anyone tell me how to set a criterion using a letter rather than a
number?

I have a variable Grade which has values A, B, C, D, F. I need to count how
many grades under A and I tried the following control expression but it does
not work:

=sum([Grade]<>'A') or

=sum(IIf([Grade]<>'A', [Grade], 'A'))

Could anyone point out the error(s) in these two expression? I will very
appreciate. Thanks.

Charles
 
The first one should work, other than returning a negative number

=Abs(SUM([Grade] <>"A"))

You can also try
=Count([Grade] = "A",Null,1)

If those don't work, can you tell us what results you are getting? An error
message? The wrong value? Nothing?

Also, make sure your control doesn't have the name [Grade].
 
Back
Top