Formula to get values between 8 and 15

S

Sam510

I am trying to get a formula that will look in column c8:c250 and will only
give me the number of occurances between two numbers. I have used the
=COUNTIF(C8:C250,"<8") to determine the number of quotes in days of the month
1-7. I have used =COUNTIF(C8:C250,">21") to determine the number of quotes in
days of the month 22 -31. I can't seem to figure out how to get the value for
days 8 thru 14, and days 15-21.

Quotes By Week Number

Days 1 - 7 17

Days 8 - 14

Days 15 - 21

Days 22 - 31 47

Thank you for your help
Sam
 
M

MartinW

Hi Sam,

Maybe,

=COUNT(C8:C250)-COUNTIF(C8:C250,"<8")-COUNTIF(C8:C250,">14")

HTH
Martin
 
T

Teethless mama

Try on these formula will do the trick

=COUNTIF(MyRange,{">=8"})-COUNTIF(MyRange,{">14"})
or
=SUM(COUNTIF(MyRange,{">=8",">14"})*{1,-1})
or
=SUMPRODUCT(--(MyRange>=8),--(MyRange<=14))
 

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