Calculated Field in a Form-formula problem

RBoshears

New Member
Joined
Oct 28, 2003
Messages
21
I have a form with an underlying query. I am attempting to generate several calculated controls based on fields within the query. Most fields contain either a "yes", "no", "pending", or No Resp". I am trying to count each result within a given field. My formula in the control is

=Count(IIF([field name],yes,0)). The result is always the total number of records, not just the ones with a "yes" in them. Help??? :oops:
 
what is the SQL record source for the List?
I suspect that you have a hidden column and that is what you should be checking against, so that your expresion would need to be something like
=Count(IIF([field name],1,0)).

Depending on the value for "yes"

HTH

Peter
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
There is a table that is referenced for the list. the source is the numeric value for ech answer: yes=1, no=2 , pending=3, na=4, no resp=5. I originally had the formula the way you had it, and it gave me the full record count.
 
Upvote 0
I think that jobb was on the right track, try
=Sum(IIF([field name]=1,1,0))

Peter
 
Upvote 0

Forum statistics

Threads
1,221,618
Messages
6,160,853
Members
451,674
Latest member
TJPsmt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top