There are two well known alternatives:
Modified IRR: You assume a reinvestment rate (for positive cash flows) and a financing rate (for negative cash flows). The calculation then is simple. Calculate the Future value (FV) of all positive cash flows using reinvestment rate, and calculate the Present value (PV) of all negative cash flows using the financing rate. Your problem is then reduced to finding the rate of return of a simple investment with alll outflows at the beginning and all inflows at the end. Excel has a built in function for this as well-MIRR.
Generalised IRR: Here again one assumes a financing rate, but reinvestment is assumed to be at the IRR ( which is yet to be estimated). Working backward from the final cash flow, one step at a time, discount the accumulated PV by one period at the IRR if it is positive, and at the fiinancing rate if it is negative. Continue until you reach time 0. Financing rate is assumed to be known, while IRR is to be estimated. You start the algorithm with an initial guess of IRR and apply a root funding algorithm, essentially iteratively updating IRR until PV of the cash flows become zero.