I am trying to write a nested IF function that pulls from cells B2,D2,E2, and F2. I have the formula written and all of those cells are highlighted when I am working on the formula, but it will only pull from E2,F2. Any help? The dates are arbitrary right now, but Im hoping to eventually use this with actual dates. =IF(F2>1/1/2000,(WORKDAY(F2,5,A13:B34)),IF(F2<1/1/2000,(WORKDAY(E2,5,A13:B34)),IF(E2<1/1/2000,(WORKDAY(D2,5,A13:B34)),IF(D2<1/1/2000,(WORKDAY(B2,5,A13:B34)),F))))

message edited by mvh

I figured out the formula that works! =IF(E2>1/1/2000,(WORKDAY(E2,2,A13:B34)),IF(D2>1/1/2000,(WORKDAY(D2,1,A13:B34)),IF(C2>1/1/2000,(WORKDAY(C2,11,A13:B34)),IF(B2>1/1/2000,(WORKDAY(B2,1,A13:B34)),FALSE))))

In an IF() statement, processing STOPS when it hits a True value,

now since your first statements isIF F2 > 01/01/2000 and IF F2 < 01/01/2000

One of those two statements

shouldreturn True, so processing StopsUNLESSyou happen to use the Date 1/1/2000 in which case, since your using JUST theGreater ThanandLess Thansymbolsbothstatements return FALSE and you continue to the next clause.I would suggest Two changes, turn either

the Greater Than symbol >

or the Less Than symbol <

into a Greater Than or Equal to symbol >=

or a Less Than or Equal symbol <=Also change your Date from the value 1/1/2000,

which in the formula evaluates out to the Number 0.005,

by using the DATE function, like DATE(2000,1,1)

this will avoid any ambiguity in the formula.So something like:

=IF(F2>=DATE(2000,1,1),(WORKDAY(F2,5,A13:B34)),

IF(F2<DATE(2000,1,1),(WORKDAY(E2,5,A13:B34)),

IF(E2<DATE(2000,1,1),(WORKDAY(D2,5,A13:B34)),

IF(D2<DATE(2000,1,1),(WORKDAY(B2,5,A13:B34)),F))))MIKE

In your second formula: =IF(E2>1/1/2000,(WORKDAY(E2,2,A13:B34)),IF(D2>1/1/2000,(WORKDAY(D2,1,A13:B34)),IF(C2>1/1/2000,(WORKDAY(C2,11,A13:B34)),IF(B2>1/1/2000,(WORKDAY(B2,1,A13:B34)),FALSE))))

You never check the F2 cell, so now I have no idea what your doing.MIKE

Ask Your Question

Weekly Poll

Do you think Google should sell budget phones in the US?

Discuss in The Lounge

Poll History