Performing calculations if a value is between A and B

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.,
 
B

Bernie Deitrick

How about

=IF(MONTH(DateCell)=8,calculation,other)

HTH,
Bernie
MS Excel MVP
 
D

David Biddulph

=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),...
 
T

Teethless mama

This formula is sum column B if column A is Aug/08

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

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