Nested Formula

B

Betty K

If the calculated amount in W is greater than 0 and the date in U is later
than 2/19/09, then 15 needs to be added to W. I tried the following formula,
but even if the date is after 2/20/09, it still adds the 15.

=SUM(AND(W2>0,U2>="2/20/09"),(W2+15))

What am I doing wrong? Thanks for your help!
 
T

T. Valko

Try one of these:

=IF(AND(U2>=DATE(2009,2,20),W2>0),W2+15,W2)

=W2+(U2>=DATE(2009,2,19))*(W2>0)*15

Or, use a cell to hold the date criteria:

A1 = 2/20/2009

=IF(AND(U2>=A1,W2>0),W2+15,W2)

=W2+(U2>=A1)*(W2>0)*15
 
S

Shane Devenshire

Hi,

You didn't tell us what you want in E2 if neither condition is true?

=IF(AND(A1>0,B1>=--"2/20/9"),A1+15)

This will display FALSE if the conditions are not met.

=IF(AND(A1>0,B1>=--"2/20/9"),A1+15,"")

This will display nothing if the test fails.

If you want to display the value of W2 if the text fails, then

=(A1>0)*(B1>=--"2/20/09")*15+A1
 

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