I have a dataset looking at ratings over time:
A B C D E
ID Date Rating-1 Rating-2 Rating-3
1 01/01/20 Y
2 01/05/19 Y
3 15/12/19 Y
I want to extract the rating for a particular ID at a particular date. As the rating is not specified in the data (as each is represented by a Y
value), I need to reference either the column heading or the column reference.
To get the relevant row, I can use a Match
formula:
=MATCH(1,(1=$A$1:$A$4)*(DATE(2020,01,01)=$B$1:$B$4),0)
- this will give row 2.
To get the column reference for a specific row, I can use a second Match
formula: =MATCH("Y",$A3:$E3,0)
- this will give column 4.
Is there a way to combine the two formulas to give me the column reference for a specified row (based on ID/Date criteria) and a specified column (the column with a Y
value)?
I have tried a Index Match Match
formula, but this seems to require the column reference to be specified, rather than finding a column with a Y
value.
INDIRECT
into the solution I posted below – Ant