Tried using SUMIF, and SUMPRODUCT in array. Having difficulty with summing (adding) the receive floating/ Pay fixed and (subtracting) the Pay floating/Receive Fixed combo.

Any help greatly appreciated.

Condition Apple Orange THEN
Receive Floating ++
Pay Fixed ++
(else) Pay Floating --
Receive Fixed --

IF (A&B) = Apple & orange
THEN ADD (E) IF (C&D) = Receive Floating OR Pay Fixed
ELSE SUBTRACT (E) IF (C&D) = Pay Floating OR Receive Fixed

A B C D E
1 Apple Orange Pay Floating 10
2 Apple Orange Receive Floating 20
3 Apple Orange Pay Fixed 30
4 Apple Orange Pay Floating 35
5 Apple Orange Receive Floating 40
6 Apple Orange Pay Fixed 45
7 Apple Orange Receive Fixed 50
8 Pear Orange Receive Fixed 40
9 Pear Orange Pay Floating 50
10 Apple Grape Receive Floating 60
11 Apple Grape Pay Fixed 70
12 Apple Grape Receive Fixed 80