Sub topic 17
Cross-checks and Troubleshooting Errors in Your Model
Assume you know Excel cell references, ranges, percentages, compound interest, and how to enter real Excel dates. This chapter focuses on checking NPV, XNPV, IRR, and XIRR calculations after you build them.
Start with the cash flow timeline
Many valuation errors begin before a formula is entered. Put each cash flow on a clear timeline. Use negative numbers for payments and investments. Use positive numbers for receipts and returns.
| Period | Date | Cash flow |
|---|---|---|
| 0 | 1-Jan-2026 | -10,000 |
| 1 | 31-Dec-2026 | 3,000 |
| 2 | 31-Dec-2027 | 4,000 |
Check that:
- The first cash flow is at time zero when it occurs today.
- Every cash flow has the intended sign.
- The dates are real Excel dates, not text that only looks like a date.
- The rate matches the timing. An annual rate should not be applied directly to monthly cash flows without adjustment.
Use independent cross-checks
For periodic cash flows, calculate NPV with the time-zero cash flow outside the NPV range:
=NPV(B1,B4:B7)+B3You can verify the result by calculating each future cash flow separately:
=B3+B4/(1+B1)^1+B5/(1+B1)^2+B6/(1+B1)^3+B7/(1+B1)^4These formulas should agree, apart from small rounding differences. If they do not, check the range and the number of periods.
For IRR, substitute the result back into the NPV calculation:
=IRR(B3:B7)
=NPV(IRR(B3:B7),B4:B7)+B3The second formula should be close to zero. A material difference suggests an incorrect range, timing error, or a rate that was rounded before being reused.
For dated cash flows, compare XNPV with a direct discounted-cash-flow calculation:
=XNPV(D1,B2:B6,A2:A6)
=SUMPRODUCT(B2:B6/(1+D1)^((A2:A6-A2)/365))XNPV uses the number of days from the first date divided by 365. XIRR should also produce an annualized rate:
=XIRR(B2:B6,A2:A6)
=XNPV(XIRR(B2:B6,A2:A6),B2:B6,A2:A6)The final XNPV should be approximately zero.
Diagnose common errors
#VALUE! often means that a cash flow or date range contains text, blanks used incorrectly, or mismatched range sizes. Ensure that the values are numeric and that the cash flow and date ranges contain the same number of cells.
#NUM! can occur when IRR or XIRR cannot find a solution from its starting point. Confirm that the cash flows include at least one negative and one positive value. Then try a different guess:
=XIRR(B2:B6,A2:A6,0.1)A valid guess does not fix incorrect data. It only helps the iterative solver begin in a more useful part of the search.
IRR can also have multiple solutions when cash flow signs change more than once. In that case, inspect an NPV profile at several trial rates and prefer NPV for comparing projects.
Exercise
XIRR returns #NUM!. What should you check first, and what formula can you try next?
Show answer
Check that the cash flows include both negative and positive values, that the dates are real Excel dates, and that both ranges have equal length. Then try XIRR with an explicit guess, such as =XIRR(B2:B6,A2:A6,0.1).