If you are having difficulty understanding how a formula is calculating in Excel – perhaps because it appears to give you the wrong results – you can step through it to see how it is working.
To do this, select the cell containing the formula and choose Tools > Formula Auditing > Evaluate Formula – in Excel 2007 find the Evaluate Formula option on the Formulas tab.
Click Evaluate and each time you do this, a portion of the formula will be evaluated and you can see it at work.
Use the Step In and Step Out options to see the actual values in place of any appropriate cell references.
This step by step processing should show you what is happening in your formula allowing you to troubleshoot any difficulties with it.