Need help with this formula....

=IF(ISBLANK(W5),F5,IF(V5="",((O5*U5)+(P5*T5)+R5),(SUM(O5:Q5)*V5)+R5))

The ISBLANK part works fine. However, if V5 is blank it is only giving me the result in R5 rather than doing the entire calculation. (O5*U5)+(P5*T5)+R5)