I'm really struggling on what I thought would be a simplistic issue. I'm trying to calculate the XIRR on a series of cash flows and dates in columnar format. Dates are in column A40:A237 and cash flows are in column O40:O237. Cash flows in column O begin as zeros and end as zeros (amounts occur in between). Dates in column A begin as zeros and end as zeros (dates occur in between). I'm currently using the following formula and keep getting a 0.0% XIRR result:

=XIRR(OFFSET(P40,COUNT(O40:O237)-COUNT(P40:P237),0,COUNT(P40:P237),1),OFFSET(O40,COUNT(O40:O237)-COUNT(P40:P237),0,COUNT(P40:P237),1))

Please help!!