=SUMPRODUCT(--(A2:A500=D2),--(B2:B500="Buddist"))
where A2:A500 are the classes, D2 the cell with the dropdown, B2:B500 are
the religions
You could also write it as
=SUMPRODUCT(--(A2:A500=D2),--(B2:B500=E2))
where E2 would hold the religion, that way you don't need to edit the
formula when changing the religion, adapt to fit your ranges
Regards,
Peo Sjoblom
"kirbster1973" wrote:
> I have a database containing details of all the children in my school, In one
> column are the classes that each child is in, in another column is their
> religion, I need to be able to count how many are of a certain religion in
> each particular class. I have a drop down list listing each class. I need a
> formula to look at that box, which is assigned to a cell, then identify all
> children in that particular class and show the number of buddhists(for
> example) in a cell.
>
> Hope I've explained this correctly and clearly
>
> Thanks in advance
>
Bookmarks