Forum Discussion
plzsiga
Sep 18, 2019Copper Contributor
Changing vlookup array based on a cell value
There are different classifications for scores based on a student's grade. I can do multiple IF statements (see column D), but that requires filtering by grade and editing the formula several times....
Haytham Amairah
Sep 18, 2019Silver Contributor
Hi,
Please check out the below formula:
=INDEX($F$2:$F$9,
IF(ISNUMBER(MATCH(C2,INDEX($G$2:$L$9,,MATCH(B2,$G$1:$L$1,0)),0)),
MATCH(C2,INDEX($G$2:$L$9,,MATCH(B2,$G$1:$L$1,0)),0),
MATCH(C2,INDEX($G$2:$L$9,,MATCH(B2,$G$1:$L$1,0)),-1)+1))
Hope that helps
- plzsigaSep 18, 2019Copper ContributorHatham, Thank you! It worked! It also was more accurate than my original code submitted. I guess I'm going to have to explore the INDEX and MATCH functions.