# Thread: Order of calc. in a nested IF (Excel 2000>)

1. ## Order of calc. in a nested IF (Excel 2000>)

Hi all,

Does the order of a multiple nested IF statement matter?
IE: Would it be better (and allow the IF to calc faster) if you structure it to assess the calculations first and then check for blank cells, or visa versa? Or does this really not matter?

See attachment for sample!

2. ## Re: Order of calc. in a nested IF (Excel 2000>)

Unless you have an extremely large number of cells with such formulas, I don't think it really matters with modern PCs.
I'd tend to avoid repetition, so I'd use
<code>=IF(F3=0,0,IF(F3<A3,"QTY NOT ALLOWED",IF(OR(C3="",AND(F3>=A3,F3<=C3)),F3*B3,F3* D3)))</code>

3. ## Re: Order of calc. in a nested IF (Excel 2000>)

How true...thanx for the tip. I never even thought of using OR. (I was not keen on the repetition in the formula anyways! It looks so much better now!)

PS: While you are at it, could you check to see if you have any suggestions to simplify the SumIf calc to work out the %. I have updated the WB.
Tx

4. ## Re: Order of calc. in a nested IF (Excel 2000>)

As far as I can see, the only error that could occur is that H14 = 0. So you could use

=IF(\$H\$14=0,0,SUMIF(\$A\$3:\$A\$11,G17,\$H\$3:\$H\$11)/\$H\$14)

5. ## Re: Order of calc. in a nested IF (Excel 2000>)

Stunning....its great to bounce these off someone with an expert knowledge like yours. A second opinion is always good, esp. if it improves on mine...which is most often the case <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

Tx again!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•