Hi,
The formula in J1 of the Printout is
The INDEX() function takes three arguments
1. A data range
2. A row number
3. A column number
and returns the value in the data range for where the data row and column numbers intersect.
The Match function requires at least 2 arguments and an optional third
1. A value to look for
2. A column in which the value will be found
3. An optional TRUE/FALSE argument which dictates whether an EXACT Match is found or the nearest match. The default if no 3rd element is specified is the Nearest value
and returns the row number nearest to the value being looked for.
In the J1 Index formula the Data range is Data!B:B
The row number is given by the MATCH function which finds today's date in column A of the Data sheet. But because the 25 November date doesn't exist and because there is no third TRUE element in the Match it finds the nearest date that is less than today's date, i.e. 20 November which is to be found in row 17 of the data column A.
The column number of the INDEX function is set to 1 since the Index Data range is only one column wide.
So all in all the INDEX() function finds row 17 column 1 of the Range (Data!B:B) i.e. 27 November.
The K1 formula is similar except that the Row number for the INDEX function which is given by the MATCH function is reduced with a -1
The system will work provided the dates are always in ascending order.
Bookmarks