Sum IIF

  • Thread starter Thread starter Clay
  • Start date Start date
C

Clay

I am creating a form to score psychological assessments
and I am using the conditional IIF statement to return
values for an number of expressions. I would also like
to sum the result of each conditional so that I will have
a count of the number of true statments for the
conditional. Here is my conditional. Can someone tell me
how to get sum to work with it? =IIF([BRIC 1]>=1,"0","0")
+IIF([BRIC 2]>=1,"1","0")+IIF([BRIC 3]>=1,"1","0")+IIF
([BRIC 4]>=1,"1","0")
 
I am creating a form to score psychological assessments
and I am using the conditional IIF statement to return
values for an number of expressions. I would also like
to sum the result of each conditional so that I will have
a count of the number of true statments for the
conditional. Here is my conditional. Can someone tell me
how to get sum to work with it? =IIF([BRIC 1]>=1,"0","0")
+IIF([BRIC 2]>=1,"1","0")+IIF([BRIC 3]>=1,"1","0")+IIF
([BRIC 4]>=1,"1","0")

Remove the quotemarks. Right now the + operator will concatenate the
String values "1" and "0", rather than adding the numeric values 1 and
0.
 
Thank you John. I removed the quotes and it worked!!
-----Original Message-----
I am creating a form to score psychological assessments
and I am using the conditional IIF statement to return
values for an number of expressions. I would also like
to sum the result of each conditional so that I will have
a count of the number of true statments for the
conditional. Here is my conditional. Can someone tell me
how to get sum to work with it? =IIF([BRIC 1] =1,"0","0")
+IIF([BRIC 2]>=1,"1","0")+IIF([BRIC 3]>=1,"1","0")+IIF
([BRIC 4]>=1,"1","0")

Remove the quotemarks. Right now the + operator will concatenate the
String values "1" and "0", rather than adding the numeric values 1 and
0.


.
 
Back
Top