Sum IIF

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

John Vinson

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.
 
G

Guest

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.


.
 

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

Similar Threads


Top