Compare the value of one cell to 2 different cells

  • Thread starter Thread starter NeedExcelHelp
  • Start date Start date
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
 
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
 
Hi,

And if your in 2007 you can also use

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