Forum Discussion

syazaaoa95's avatar
syazaaoa95
Brass Contributor
May 05, 2023
Solved

How to use IFs for multiple Category conditions

Below, I had attached my excel.  I have problems, where I wanted to use my IFs for my categories. But turns out, I can't use it.  This is my function and it only works for first row only. The o...
  • Riny_van_Eekelen's avatar
    May 05, 2023

    syazaaoa95 

    Not sure why you thought of using IFS. Try XLOOKUP like below if your Excel version supports it. But first transform the DATA into a structured table. I just called it Table1.

     

     

    =XLOOKUP([@CATEGORY],Table1[CATEGORIES],Table1[TYPE OF PRODUCT],"Not found")

     

     

    Alternatively, use INDEX and MATCH to achieve the same result.

     

     

    =IFERROR(INDEX(Table1[TYPE OF PRODUCT],MATCH([@CATEGORY],Table1[CATEGORIES],0)),"Not found")

     

     

     

Resources