Counting Results

Eileen

New Member
Joined
Mar 30, 2003
Messages
4
I tried to save some steps in my db by using the same lookup table for a number of questions. In my report, I'm trying to count the results for these questions, but as I try to use the formula ex. =Sum(IIF([Responses]=1,1,0)) to count the results for each question, I' m getting the same results for each question.

I'm trying to avoid making any more lookup tables. Does anyone know if I can get around this? I'm trying to reference the field to the formula as =Sum(IIF([Responses.FieldName]=1,1,0)) .. not going anywhere.

Thanks.


Eileen
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Can you give more information? Like what your data looks like and the results you are getting now....

Thank you,

Russell
 
Upvote 0
Don't you need to use the "Count" function first and then Sum.

If it makes it easier set up a expression using "Count" in the Query bound to your report (if that's how it's set up), and then just Sum the expression in the report.

Ziggy
 
Upvote 0
Report Calculations

I figured out what my problem was. I used the same lookup table for several questions, but it's not the lookup table that goes in my formula, it's the field name.

Ex: Not Right =Sum(IIF([Response]=1,1,0)) is the lookup table
Ex: Right =Sum(IIF([Field Name]=1,1,0)) is the field name

I tested this and it worked. The one problem I can't figure out yet is if one of my fields has strings, ex. atlantic, mercer, middlesex ... how can I sort the same responses together and get a count out of it? Ex. atlantic 2, mercer 5, middlesex 8. The wizard doesn't work
because I have too many fields and I unfortunately have to do it manually.

Eileen :cry:
 
Upvote 0

Forum statistics

Threads
1,221,525
Messages
6,160,327
Members
451,637
Latest member
hvp2262

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