0

I am writing an excel function that basically says this:

If B2 is blank, do nothing.

If B2 has text in it, then check to see if I2 is blank.

If I2 is blank, then check to see if H2 is less than Zero.

If H2 is less than Zero, return "No", otherwise return "Yes"

If I2 is NOT blank, then check to see if I2 is less than Zero.

If I2 is less than Zero, return "No", otherwise return "Yes"

I have written the function as below, however, I am getting an error. I have looked it over numerous times and I am not sure what is wrong. A pair of fresh eyes and help is much appreciated.

IF(B2="", "", (IF(I2="", (IF H2<0, "No", "Yes"), IF(I2<0, "No", "Yes"))))
1
  • 1
    (IF H2 should be IF(H2. and (if(...)) doesn't need the external () either. Commented Jul 11, 2016 at 15:19

1 Answer 1

1

You have your ( in the wrong places:

=IF(B2="", "", IF(I2="", IF( H2<0, "No", "Yes"), IF(I2<0, "No", "Yes")))
Sign up to request clarification or add additional context in comments.

1 Comment

Oh my goodness- I don't know how I missed that. Much appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.