Forum Discussion

Muhammad Khan's avatar
Muhammad Khan
Copper Contributor
Mar 23, 2017
Solved

Formula or if statement for multiple conditions

Hello All

 

I have a quick question.

 

I want to categorize my data in three categories like Good Average and Bad, the whole sheet consists of different groups. Below is the example of data, the file is attached as well.

 

S/NGroupsAmountCategory Scale for Group A
1A10  12 to 15Good
2A12  16 to 20Average
3A2  ElseBad
4A30    
5A12    
6A12  Scale for Group B
7A3  50 to 60Good
8A9  61 to 70Average
9B58  ElseBad
10B69    
11B35    
12B55  Scale for Group C
13C2  1 to 2Good
14C3  3 to 4Average
15D1  ElseBad
16D1    
17D2    
18D6  Scale for Group D
19D9  4 to 6Good
20D0  7 to 10Average
21D3  ElseBad
22D3    

 

 

Thanks in advance 

 

  • Hello Muhammad

     

    Restrcuture your scale tables into one table.

     

    Group - Lower - Category

    A - 0 - Bad

    A - 12 - Good

    A - 16 - Average

    A - 21 - Bad

    etc.

     

    In my example the new table is in columns I:K.

     

    Then this formula in D2:

     

    =LOOKUP(2,1/($I$2:$I$17=B2)/($J$2:$J$17<=C2),$K$2:$K$17)

4 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Hello Muhammad

     

    Restrcuture your scale tables into one table.

     

    Group - Lower - Category

    A - 0 - Bad

    A - 12 - Good

    A - 16 - Average

    A - 21 - Bad

    etc.

     

    In my example the new table is in columns I:K.

     

    Then this formula in D2:

     

    =LOOKUP(2,1/($I$2:$I$17=B2)/($J$2:$J$17<=C2),$K$2:$K$17)

Resources