I need a formula that will look up a date within another date range and return the date I'm looking for into another cell.
eg. (See below table) I have 26 fortnightly date ranges in 2 columns (From Date and To Date) - these are date ranges to calculate fortnightly payment amounts to students. I then have one date range in 2 cells (From and To) where the student is on leave. The leave dates can fall at any time over the fortnightly date ranges. I need to:
Find the first date of the leave period within the payment date ranges and return it to the corresponding row of the 'Leave from' column.
Find the last date of the leave period found in within the payment date ranges and return it to the corresponding row of the 'Leave to' column.