0

Please Help! I am a novice excel user and I am trying to get this formula to compute and not having any luck. Is there anything glaringly obvious to anyone?

=IF(D4>(0.2*D3),0,IF(D4>(0.15*D3)<(0.1999*D3),0.0035,IF(D4>(0.1*D3)<(0.1499*D3),0.0054,IF(D4>(0.05*D3)<(0.0999*D3),0.0064,))))
1
  • 2
    Please include some sample data so we know what you are working with. Also explain your expected output, we cannot know what you are trying to do :).
    – terdon
    Mar 22, 2013 at 17:59

2 Answers 2

2

You can't evaluate D4 against multiple values that way. You have to use AND() like this:

=IF(D4>(0.2*D3),0,IF(AND(D4>(0.15*D3),D4<(0.1999*D3)),0.0035,IF(AND(D4>(0.1*D3),D4<(0.1499*D3)),0.0054,IF(AND(D4>(0.05*D3),D4<(0.0999*D3)),0.0064,))))

Otherwise, things look okay (parentheses are balanced, there are no syntax errors, etc.).

0

Typically you don't need AND because each IF already deals with one range of data so this sort of setup should be possible

=IF(D4>0.2*D3,0,IF(D4>0.15*D3,0.0035,IF(D4>0.1*D3,0.0054,IF(D4>0.05*D3,0.0064,0))))

you might want to look at what you want the result to be if D4=D3*0.1 or one of the other "boundary" values because when you use just < and > without = in either you are not explicitly defining those and you'll get zero - that doesn't happen with my version

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .