Formula Query

G

Guest

I am using a formula to count the number of occurances of an entry - in an
ever expanding list of data.

The formula that I am using is as follows:

=COUNTIF(ActualWeight,">=20")-COUNTIF(ActualWeight,">29")

This counts the number of occurances of a weight between 20 and 29 (where
ActualWeight is a named range for the data).

This formula works absolutely fine and is bringing back a count.

I would now like to extend the formula so that it only counts the above if
it meets another criteria (a school name) - which has a named range of
SchoolName.

Does anyone have any suggestions on what I could try - I have attempted a
couple of things and I cannot seem to get it to work.

Thanks in advance for your help.
 
R

Ron Rosenfeld

I am using a formula to count the number of occurances of an entry - in an
ever expanding list of data.

The formula that I am using is as follows:

=COUNTIF(ActualWeight,">=20")-COUNTIF(ActualWeight,">29")

This counts the number of occurances of a weight between 20 and 29 (where
ActualWeight is a named range for the data).

This formula works absolutely fine and is bringing back a count.

I would now like to extend the formula so that it only counts the above if
it meets another criteria (a school name) - which has a named range of
SchoolName.

Does anyone have any suggestions on what I could try - I have attempted a
couple of things and I cannot seem to get it to work.

Thanks in advance for your help.

Something like:

=SUMPRODUCT((ActualWeight>=20)*(ActualWeight<=29)*(SchoolName="Alvirne High"))


--ron
 
P

Pete_UK

Try this:

=SUMPRODUCT((ActualWeight>=20)*(ActualWeight<=29)*(School=B1))

where School is the named range and B1 contains the name of the
school.

Hope this helps.

Pete
 

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

Top