XIRR will do what you want if I read the thread correctly.
However, most people really want the time weighted rate of return for the overall portfolio, i.e. one that is insensitive to cash flows... A simple example is to think of a mutual fund. If it's 100 at year 0, 50 at year 0.5, 150 at...