I have dates sorted in ascending order in a column. I want to find a date and its absolute row number for two different cases.
Case 1 (Formula 1 & Formula 2): I want to find the first date (and its row number) that is equal to a given date or the next available date if it does not exist
Case 2 (Formula 3 & Formula 4): I want to find the last date (and its row number) that is equal to a given date or the last previous date if it does not exist.
For example, I have a column with dates:
row1: 8/1
row2: 8/2
row3: 8/2
row4: 8/4
row5: 8/4
row6: 8/5
row7: 8/7
Case 1:
Given Date= 8/3 => Excel should find 8/4 and row4 (show results in 2 different cells)
Given Date= 8/4 => Excel should find 8/4 and row4 (show results in 2 different cells)
Case 2:
Given Date= 8/3 => Excel should find 8/2 and row3 (show results in 2 different cells)
Given Date= 8/4 => Excel should find 8/4 and row5 (show results in 2 different cells)
Thank you so much in advance!
p.s.
Case 1 is used as the start date of a calculation
Case 2 is used as the end date of a calculation
Bookmarks