Performing calculations if a value is between A and B

  • Thread starter Thread starter M. Nelson
  • Start date Start date
M

M. Nelson

how do i use "if" or "sumif" to perform a calculation when the statement "A>
x and B<y" is true

I am trying to run calculations when a date is within a month, e.g.,
 
=IF(AND(A1>DATE(2008,31,7),B1<DATE(2008,9,1)),value_if_true,value_if_false)
or (if your A and B are looking at the same cell):
=IF(AND(YEAR(A1)=2008,MONTH(A1)=8),...
 
This formula is sum column B if column A is Aug/08

=SUMPRODUCT(--(TEXT(A1:A100,"m/yy")="8/08"),B1:B100)
 
Back
Top