I am using a nested if statement to determine the date and amount of an investment. The function works in the affirmative but returns false otherwise. I have put 0 as the last value so not sure why I am getting false. Formula:

=IF($J12=L$10,IF($G12="B",Assumptions!$E$17,IF(CapEx!$G12="H",Assumptions!$F$17,IF(CapEx!$G12="L",Assumptions!$G$17,0))))

=IF($J12=L$10,IF($G12="B",Assumptions!$E$17,IF(CapEx!$G12="H",Assumptions!$F$17,IF(CapEx!$G12="L",Assumptions!$G$17,0))),0)

Perfect! Thanks!!

When an IF function returns FALSE, it means that you have not specified a value _if_falseto be returned for thatlogical_test.Here's what you have:

IF J12 = L10, test G12 = "B"

IF G12 = B return Assumptions!$E$17

IF G12 <> "B", test CapEx!$G12 = "H"

IF CapEx!$G12 = "H" return Assumptions!$F$17

IF CapEx!$G12 <> "H" test CapEx!$G12 = "L"

IF CapEx!$G12 = "L" return Assumptions!$G$17

IF CapEx!$G12 <> "L" return 0

You don't have a

value_if_falseargument for when J12 <> L10.What do you want returned when J12 <> L10

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

when J12 <> L10 the return should be 0.

...and now you know why it didn't! ;-)

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Ask Your Question

Weekly Poll

How long do you think until flying cars or taxis are common?

Discuss in The Lounge

Poll History