I'm currently stuck with an excel problem that I can't seem to find an answer to.
Take the following example dataset:
A B C D E F G
Date Color Lookup Adjacent value
1-1-2017 Green 3-5-2018
3-5-2018 Yellow 4-7-2018
4-7-2018 Green 9-9-2018
1-2-2016 Purple 3-5-2018
6-9-2014 Red
9-9-2018 Green
3-5-2018 Blue
Values in column A and B are hardcoded.
Values in column F have been retrieved with the following formula that 'filters' the main data based on dates between 1-1-2018 and 31-12-2020 (in my real dataset column A and B will be on a different sheet than the lookup values and the required adjacent values):
=IFERROR(INDEX($A$1:$A$8;AGGREGATE(15;6;ROW($A$1:$A$8)/(($A$1:$A$8>=DATE(2018;1;1))*($A$1:$A$8<=DATE(2021;1;1)));ROW($A1)));"")
I now need to find a way to retrieve the adjacent cell values from column B (e.g. color) based on the lookup values in column F and place them in column G. The dataset should then look as follows:
A B C D E F G
Date Color Lookup Adjacent value
1-1-2017 Green 3-5-2018 Yellow
3-5-2018 Yellow 4-7-2018 Green
4-7-2018 Green 9-9-2018 Green
1-2-2016 Purple 3-5-2018 Blue
6-9-2014 Red
9-9-2018 Green
3-5-2018 Blue
It is important for the sequence to remain intact; even though column A contains a duplicate of 3-5-2018 they are not the same due to their color being different.
My main question: How do I attach the correct color to the correct lookup date value?
Any help would be so very much appreciated!
Kind Regards,
VHes