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.


.
 

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

sum iff 2
Aggregate Function Error 0
Standard Deviation 3
Stand Deviation Expression 6
sum of calculated fields in header of report 1
Super complex if statement 12
#Div/0! Error Message in Access 3
IIF statement 5

Back
Top