Forum Discussion
Match-Index with variable column
- Sep 23, 2022
GLedesma26 Entered this formula in E2 and copied it down. It seems to do what you need.
=INDEX($H$13:$H$15,MATCH(C3,INDEX($I$13:$K$15,,MATCH(B3,$I$12:$K$12,0)),0))File attached.
Could you attach a sample workbook (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Alternatively, you can attach it to a private message to me. Thanks in advance.
Hi HansVogelaar
https://docs.google.com/spreadsheets/d/1WEo43g1xBpRYPhPwu_SEKJQd4e3ryppfXbh6u0Pl-oI/edit#gid=0
Here I created a google sheet with an example of the case.
Of course, in reality, I will have many more categories and subcategories, and even some of them might have the same name and yet get a different number.
You should be able to make comments on the sheet. Thank you in advance!!!
- OliverScheurichSep 23, 2022Gold Contributor
=INDEX($H$13:$H$15,SUMPRODUCT(MMULT(TRANSPOSE(N(C3=$I$13:$K$15)),ROW($1:$3))))An alternative could be INDEX and SUMPRODUCT. Enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021.
- Riny_van_EekelenSep 23, 2022Platinum Contributor
GLedesma26 Entered this formula in E2 and copied it down. It seems to do what you need.
=INDEX($H$13:$H$15,MATCH(C3,INDEX($I$13:$K$15,,MATCH(B3,$I$12:$K$12,0)),0))File attached.