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)