Forum Discussion
vlookup + match
- Sep 12, 2024
=IFERROR(INDEX($I$9:$L$12,MATCH($H2,$H$9:$H$12,0),MATCH($G2,$I$8:$L$8,0)),"incorrect")
This returns the results for fruit and country however in the database there are no values for months. Therefore we can't include criteria for months in the formula.
=IFERROR(INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=A9)*($B$2:$B$5=B9),0)),"incorrect")
This is a job for INDEX and MATCH in my understanding. The formula must be entered as an arrayformula with ctrl+shift+enter if someone doesn't work with Office 365 or Excel for the web or Excel 2021.
This seems to work on the first example I provided. But how can I make the same criteria work when the data is built differently? I will attach an update.
- OliverScheurichSep 12, 2024Gold Contributor
=IFERROR(INDEX($I$9:$L$12,MATCH($H2,$H$9:$H$12,0),MATCH($G2,$I$8:$L$8,0)),"incorrect")
This returns the results for fruit and country however in the database there are no values for months. Therefore we can't include criteria for months in the formula.
- Maddy1010Sep 15, 2024Brass ContributorThank you! It worked perfectly!