Spreadsheet: 150087d1334275405-exclamation-summing-the-correct-numbers-example
Sheet: Sheet1

Masters | Category | Amount | Slaves | Category | Amount |  | The new columns should look like this: | 1 Results | Category | Amount |  |  | Explanation:
BVN | 1 | 9 | ABX | 1 | -3 |  |  | BVN | 1 | 9
EEP | 1 | -5 | AGU | 1 | -3 |  |  | ABX | 1 | -3 |  |  | Column B and E must match
ENB | 1 | -6 | APA | 1 | 1 |  |  | AGU | 1 | -3 |  |  | Every master has to have slaves below him to equal to 0. The slaves can be random, as long as the category matches.
IMO | 1 | 0 | APD | 1 | -1 |  |  | EOG | 1 | -1
KMR | 1 | -5 | AU | 1 | -1 |  |  | CNQ | 1 | -1 |  |  | The rest of the slaves also equal 0 and have to be displayed below.
MMP | 1 | 0 | BBL | 1 | 2 |  |  | CCJ | 1 | -1
PKX | 1 | -6 | BHP | 1 | 3 |  |  |  | sum = | 0 |  |  | Hopefully it is all clear and some Excel genius can solve this problem!
PTR | 1 | 3 | CCJ | 1 | -1 |  |  | EEP | 1 | -5
SSL | 1 | 2 | CNQ | 1 | -1 |  |  | EPD | 1 | 4
SYT | 1 | 3 | DNR | 1 | 1 |  |  | APA | 1 | 1
YZC | 1 | -1 | DO | 1 | 0
BTI | 2 | -3 | EOG | 1 | -1 |  |  | ENB | 1 | -6
CAJ | 2 | -3 | EP | 1 | 3 |  |  | EP | 1 | 3
HMC | 2 | -1 | EPD | 1 | 4 |  |  | ETP | 1 | 3
AEG | 3 | 0 | ETP | 1 | 3
BAM | 3 | -7 | GFI | 1 | -3 |  |  | KMR | 1 | -5
BBVA | 3 | 0 | GG | 1 | -2 |  |  | BBL | 1 | 2
BNS | 3 | -1 | KMP | 1 | 3 |  |  | BHP | 1 | 3
BPO | 3 | 4 | MRO | 1 | -2
CIB | 3 | 3 | MUR | 1 | -1 |  |  | PKX | 1 | -6
CM | 3 | 2 | NBL | 1 | 1 |  |  | WMB | 1 | 3
CNA | 3 | 5 | NXY | 1 | -1 |  |  | KMP | 1 | 3
HDB | 3 | 5 | OXY | 1 | -2
ING | 3 | 0 | SLB | 1 | 1 |  |  | PTR | 1 | 3
PUK | 3 | 7 | STO | 1 | 1 |  |  | GFI | 1 | -3
SLF | 3 | 2 | SU | 1 | -2
WBK | 3 | 1 | TLM | 1 | -1 |  |  | SSL | 1 | 2
AME | 4 | 4 | TOT | 1 | 1 |  |  | SU | 1 | -2
CNH | 4 | 4 | VALE | 1 | 4
CRH | 4 | 6 | WMB | 1 | 3 |  |  | SYT | 1 | 3
CUK | 5 | -1 | DEO | 2 | 3 |  |  | TLM | 1 | -1
LUX | 5 | -2 | FMX | 2 | 3 |  |  | GG | 1 | -2
WPPGY | 5 | 2 | TM | 2 | 1
STM | 6 | -5 | AXP | 3 | 0 |  |  | YZC | 1 | -1
TSU | 6 | 1 | BBD | 3 | -1 |  |  | STO | 1 | 1
TU | 6 | -1 | BCS | 3 | 0
WIT | 6 | 3 | [NAME] | 3 | 1 |  |  | -The rest
 |  |  | BMO | 3 | 2 |  |  | VALE | 1 | 4
 |  |  | BXP | 3 | -1 |  |  | DNR | 1 | 1
 |  |  | C | 3 | -1 |  |  | NBL | 1 | 1
 |  |  | CS | 3 | 1 |  |  | SLB | 1 | 1
 |  |  | GS | 3 | -1 |  |  | TOT | 1 | 1
 |  |  | HIG | 3 | -2 |  |  | APD | 1 | -1
 |  |  | IBN | 3 | -3 |  |  | AU | 1 | -1
 |  |  | ITUB | 3 | -3 |  |  | MUR | 1 | -1
 |  |  | JPM | 3 | 0 |  |  | NXY | 1 | -1
 |  |  | [NAME] | 3 | -2 |  |  | MRO | 1 | -2
 |  |  | L | 3 | 1 |  |  | OXY | 1 | -2
 |  |  | LNC | 3 | -3
 |  |  | MAC | 3 | 2
 |  |  | MET | 3 | -1
 |  |  | MFC | 3 | -1
 |  |  | MS | 3 | -1
 |  |  | PLD | 3 | -3
 |  |  | RY | 3 | 3
 |  |  | SPG | 3 | 2
 |  |  | STD | 3 | -5
 |  |  | STI | 3 | -1
 |  |  | TD | 3 | 1
 |  |  | UBS | 3 | -1
 |  |  | VNO | 3 | -3
 |  |  | WY | 3 | -1
 |  |  | CX | 4 | 0
 |  |  | DE | 4 | -3
 |  |  | ETN | 4 | -3
 |  |  | HON | 4 | -4
 |  |  | IR | 4 | -3
 |  |  | ITW | 4 | -1
 |  |  | PH | 4 | 0
 |  |  | ROK | 4 | 1
 |  |  | SWK | 4 | -1
 |  |  | CCL | 5 | 1
 |  |  | CNI | 5 | 0
 |  |  | CP | 5 | 0
 |  |  | FIS | 5 | 1
 |  |  | M | 5 | -1
 |  |  | MAR | 5 | -1
 |  |  | MHP | 5 | 1
 |  |  | ACN | 6 | -1
 |  |  | AMX | 6 | -1
 |  |  | CTSH | 6 | 0
 |  |  | INFY | 6 | 2
 |  |  | KLAC | 6 | 2
 |  |  | NTAP | 6 | -1
 |  |  | TXN | 6 | 1