Go to Tools>Add-ins and check the Analysis ToolPak add-in.
The XIRR Function will then be available.
BTW....Help on XIRR would have shown you the following.
Returns the internal rate of return for a schedule of cash flows that is not
necessarily periodic. To calculate the internal rate of return for a series of
periodic cash flows, use the IRR function.
If this function is not available, and returns the #NAME? error, install and
load the Analysis ToolPak add-in.
Gord Dibben Excel MVP