Sum / countif data range

E

Ed Peters

Hi all,

I've data that I need to count if it's between a certain value

eg:

London,3
London,7
Rome,1
Rome,5
Rome,5

=SUM((B1:B10="London")*(A1:A10>6))
This is as an array

So the above would give an answer of London 1, however I would like to
use instead of >6 a range, eg >6 and < 10.
How would I do that?

Should I be using countif.

Thanks,

Ed
 
B

Bob Phillips

=SUMPRODUCT(--(B1:B10="London"),--(A1:A10>6),--(A1:A10<10))


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
M

Mike H

Hi,

Possibly

=SUM((B1:B10="London")*(A1:A10>6))-SUM((B1:B10="London")*(A1:A10>10))

Mike
 

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