hi,
I am trying to do an index match for 2 criteria. Lets say i have to return a random number from column C. Matching criteria 1 is DEF and matching criteria 2 is 01/11/2021 (I'd like to match the closest date). So ideally I would return Random(6).
A B C
ABC 01/01/2020 random(1)
ABC 01/01/2021 random(2)
ABC 01/01/2022 random(3)
DEF 01/01/2020 random(4)
DEF 01/01/2021 random(5)
DEF 01/01/2022 random(6)
I'm struggling to merge the 2 criteria into a single formula. I thought along the lines of sumproduct or Match(criteria1&2,range1&2) but struggling to formulate this.
Help would incredibly appreciated.
I am trying to do an index match for 2 criteria. Lets say i have to return a random number from column C. Matching criteria 1 is DEF and matching criteria 2 is 01/11/2021 (I'd like to match the closest date). So ideally I would return Random(6).
A B C
ABC 01/01/2020 random(1)
ABC 01/01/2021 random(2)
ABC 01/01/2022 random(3)
DEF 01/01/2020 random(4)
DEF 01/01/2021 random(5)
DEF 01/01/2022 random(6)
I'm struggling to merge the 2 criteria into a single formula. I thought along the lines of sumproduct or Match(criteria1&2,range1&2) but struggling to formulate this.
Help would incredibly appreciated.