smide
Board Regular
- Joined
- Dec 20, 2015
- Messages
- 162
- Office Version
- 2016
- Platform
- Windows
Hello.
In cell B1 I have current date created with formula =today() eg. 26-Sep-2019.
In the same column starting from cell B3 (B3:B600) I have dates and time in format dd.mm.yyyy - hh:mm (example. 20.09.2019 - 21:00).
All those cells (B3:B600) are text cells. In column A there are numbers/index in ascending order.
Somehow I need to find the closest date (B3:B600) to the current date (B3) and to return the corresponding index (column A) into cell C3.
example.
<tbody>
</tbody>
explanation: closest date is 27.09.2019 (cell B6) so index in cell C3 is 4 (A6).
In cell B1 I have current date created with formula =today() eg. 26-Sep-2019.
In the same column starting from cell B3 (B3:B600) I have dates and time in format dd.mm.yyyy - hh:mm (example. 20.09.2019 - 21:00).
All those cells (B3:B600) are text cells. In column A there are numbers/index in ascending order.
Somehow I need to find the closest date (B3:B600) to the current date (B3) and to return the corresponding index (column A) into cell C3.
example.
A | B | C | |
1 | 26-Sep-2019 | ||
2 | |||
3 | 1 | 22.09.2019 - 22:00 | 4 |
4 | 2 | 22.09.2019 - 22:00 | |
5 | 3 | 24.09.2019 - 21:00 | |
6 | 4 | 27.09.2019 - 16:00 | |
7 | 5 | 29.09.2019 - 12:45 |
<tbody>
</tbody>
explanation: closest date is 27.09.2019 (cell B6) so index in cell C3 is 4 (A6).