Compare the value of one cell to 2 different cells

N

NeedExcelHelp

Hi,
I need some help. I'm trying to do the following without having to count
cells then adding them in different work sheets. Please let me know if my
explantion is not good.

I want to sum up the total number of instances that falls within a date
range. For example, if value in the A column is >= B1 AND <= B2 then C1 =
C1+1

A B C
1 12-1-2008 12-1-2008
2 12-8-2008 12-8-2008
3 10-1-2008
4 12-5-2009
5 12-1-2008
 
L

Lars-Åke Aspelin

Hi,
I need some help. I'm trying to do the following without having to count
cells then adding them in different work sheets. Please let me know if my
explantion is not good.

I want to sum up the total number of instances that falls within a date
range. For example, if value in the A column is >= B1 AND <= B2 then C1 =
C1+1

A B C
1 12-1-2008 12-1-2008
2 12-8-2008 12-8-2008
3 10-1-2008
4 12-5-2009
5 12-1-2008

Try this formula in cell C1:

=SUMPRODUCT((A1:A5>=B1)*(A1:A5<=B2))

Hope this helps / Lars-Åke
 
S

Shane Devenshire

Hi,

And if your in 2007 you can also use

=COUNTIFS(A1:A12,">="&B1,A1:A12,"<="&B2)
 

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