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2
KLAC 6 2
NTAP 6 -1
TXN 6 1



The new columns should look like this:

BVN 1 9
ABX 1 -3
AGU 1 -3
EOG 1 -1
CNQ 1 -1
CCJ 1 -1

EEP 1 -5
EPD 1 4
APA 1 1

ENB 1 -6
EP 1 3
ETP 1 3

KMR 1 -5
BBL 1 2
BHP 1 3

PKX 1 -6
WMB 1 3
KMP 1 3

PTR 1 3
GFI 1 -3

SSL 1 2
SU 1 -2

SYT 1 3
TLM 1 -1
GG 1 -2

YZC 1 -1
STO 1 1

-The rest
VALE 1 4
DNR 1 1
NBL 1 1
SLB 1 1
TOT 1 1
APD 1 -1
AU 1 -1
MUR 1 -1
NXY 1 -1
MRO 1 -2
OXY 1 -2

Explanation:

Column B and E must match
Column A (bold) are the "masters" and D are the "slaves"
Every master has to have slaves below him to equal to 0. The slaves can be random, as long as B and E match.

The rest of the slaves also equal 0 and have to be displayed below.

Hopefully it is all clear and some Excel genius can solve this problem!