Multiple If Statements

E

Erin

I have been staring at the screen too long I think trying to fix this. I
waive the white flag in concession and ask for help.

Here is an example of my data

E F G H I J
1 1/5 1/6 1/7 na na 2/4
2 1/5 na na na na 2/4
3 1/5 1/6 1/7 1/8 1/9 2/4

What I am trying to do is have it tell me the number of work days between J1
and either I1, G1 or E1 depending on if either H1 or F1 have na listed.

Basically for row one it should return 20, row 2 should return 22, row 3
should return 18.

This is what I have however I always get an error:
=IF(J8=0," ",IF(E8=0,"
",IF(H8="na",(IF(F8="na",NETWORKDAYS(E8,J8)-1),NETWORKDAYS(G8,J8)-1),NETWORKDAYS(I8,J8)-1)))

Another one I tried is but it errors if F has na:
=IF(J6=0," ",IF(E6=0,"
",IF(H6="na",NETWORKDAYS(G6,J6)-1,IF(F6="na",NETWORKDAYS(E6,J6)-1,NETWORKDAYS(I6,J6)-1))))

Any suggestions?
 
T

T. Valko

Hmmm...

This looks really familiar only worded differently!

Try this:

=IF(J1="","",NETWORKDAYS(IF(COUNT(E1:I1),MAX(E1:I1),J1),J1)-1)

Copy down as needed
 
E

Erin

Thank you!!!! It works!!

T. Valko said:
Hmmm...

This looks really familiar only worded differently!

Try this:

=IF(J1="","",NETWORKDAYS(IF(COUNT(E1:I1),MAX(E1:I1),J1),J1)-1)

Copy down as needed
 

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