Is it possible to do an IF within an IF?

Example:

=IF($F$41="ABC",IF(OR($I$60>P133),O134-O133,IF($I$60<O133,0,$I$60-P132),IF($F$41="DEF",IF(OR($I$60>P141),P141-O141,IF($I$60<O141,0,$I$60-P140)))))

I have 3 more like " ABC" to add to the formula, but what I am trying isn't working.

Thank you!