I have a table, example below, where users select the Priority and Complexity from a list of options and a number is assigned in the Rank column based on the combination of item
Embedded ifs are a nightmare to debbug/audit. Most of the times you can write a simpler function using Index(Match()) or Sumprod--
Here:
Use a sumproduct :
=SUMPRODUCT(--(B4:B6=G3),--(C4:C6=H3),D4:D6)
This formula makes me shudder a bit. I've never been a fan of huge nested IF
formulas because they are difficult to read, fragile, and easy to mess up.
I highly recommend just making a small reference table instead, then using an INDEX
/MATCH
approach to lookup the appropriate value. See example below.
Note you can put the table where ever you want, you can even hide it if necessary.
A colleague has now solved this for me, thought I'd share it here in case anyone else can benefit:
=IF(F2="High",IF(G2="Simple",1,IF(G2="Complex",2,IF(G2="Unknown",1))),IF(F2="Medium",IF(G2="Simple",1,IF(G2="Complex",2,IF(G2="Unknown",2))),IF(F2="Low",IF(G2="Simple",2,IF(G2="Complex",3,IF(G2="Unknown",3))))))