Here is the formula, but it keeps coming back invalid

=IF(d12="highest monthly interest",(E22=MAX($E$22:$X$22),$C$19+$Z$25,"0"))

The E22 and on is the original (IF) formula, I am just trying to find a way to have that formula only if it is highest monthly interest.