IF function

G

Guest

Hi,

I have this formula in Excel, but it only works in some cases, not all. I
can't figure out why, maybe someone can help me with this.

IF(ISERROR(IF(OR(AG2<0,AE2<DATEVALUE("01/01/05"),AE2<="07/01/05"),0,AG2*NETWORKDAYS($B$265,MIN(AE2,DATEVALUE("12/31/05")))/NETWORKDAYS("07/29/05",AE2))),0,IF(OR(AG2<0,AE2<DATEVALUE("1/1/05"),AE2<="07/29/05"),0,AG2*NETWORKDAYS("07/29/05",MIN(AE2,DATEVALUE("12/31/05")))/NETWORKDAYS("07/29/05",AE2)))

Thanx!
 
G

Guest

The formula doesn't work for years 19XX -2003. Based on the formula, it
should be 0. However, they are showing up with negative numbers.

JN
 
G

Guest

I don't know what is happening,
but you could tr
=if(AE2=datevalue("7/29/05"),0,max(0,AG2*NETWORKDAYS("07/29/05",MIN(AE2,DATEVALUE("12/31/05")))/NETWORKDAYS("07/29/05",AE2)))
instead
 

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