Hi all

I need a nested IF function on my spreadsheet (I think!) and know how to get part way through, but now I'm stuck.

Here's my formula as it is:

=IF(K4="",L5-J5,L5-K5)
However, I need to be able to insert something regarding L5 as this will not always have a value. If L5 is "" then I need to know if J5 is earlier than today's date (at the time of the formula being used), or if it is later. If J5 is "" then I would need to compare K5 with today's date instead.

Can anyone help please? I'd be very grateful! Please note that L5, J5, and K5 are all date values, and my result is a number which I can then work with.



Helen