Please find the formulae for calculating the project investment ratios and the used definitions below:
Be careful if you use NPV in Excel. Normally, net present value (NPV) means that you are netting the present value (PV) of the return CFs from period 1 and later with the investment in period 0. However, the NPV-function in Excel only calculates the present value of the return cash flows from period 1 and later. You have to net this PV with the investment in period 0 yourself in order to get the NPV.
Be careful if you use the definition of MIRR from Excel. Not all cash flows that are negative can be considered investments. You also should not net negative investments with positive return cash flows from the same period. This distorts the MIRR.