Forum Discussion

Michele Taylor's avatar
Michele Taylor
Copper Contributor
Sep 25, 2018

IFS formula with multiple column lookups

I am trying to do a lookup in one column and return a value from one of five other columns based on the lookup value. The "Score in Dept" should return the value based on "Dept Collapsed". So in the first row, the Score in Dept for Assembly should be 2, Weld score is 3, Paint score is 1, etc.

 

Dept Collapsed.Assembly ScoreMachining ScorePaint ScoreStamping ScoreWeld ScoreScore in Dept
Assembly23223 
Weld33333 
Paint21112 
Weld43334 
Machining22232 

 

I have this formula from an old spreadsheet (I didn't create it) and it should work, but doesn't. 

 

=IFERROR(IF(IFS([@[Dept Collapsed]]="Assembly",[@[Assembly Score]],[@[Dept Collapsed]]="Machining",[@[Machining Score]],[@[Dept Collapsed]]="Paint",[@[Paints Score]],[@[Dept Collapsed]]="Stamping",[@[Stamping Score]],[@[Dept Collapsed]]="Weld",[@[Weld Score]], IFS([@[Dept Collapsed]]="Assembly",[@[Assembly Score]],[@[Dept Collapsed]]="Machining",[@[Machining Score]],[@[Dept Collapsed]]="Paint",[@[Paints Score]],[@[Dept Collapsed]]="Stamping",[@[Stamping Score]],[@[Dept Collapsed]]="Weld",[@[Weld Score]],"")))

 

Thank you in advance for your help

 

Resources