I have column A with sales channel ID, column B with seller IDs (not in order, but with some duplicate, because a seller can sell his product via different channels). Column C with seller's original volume. Column D with the delivered volume of the most efficient channel (only one channel have a non-zero volume).
Now I want to create colomn E to show the remaining volume of each seller. I want to look up the ID of the seller that delivered volume (the non-zero volume in column D and deduct the delivered volume from that seller.
I can't just use E=C-D because then it won't pick up the correct volume for channel 4 and 7. I can't use pivot table because this is part of an optimization model and i need the calculation to flow through automatically. Thanks!!
A B C D E
1 5 100 0
2 3 20 0
3 7 500 3
4 7 500 0
5 1 90 0
6 2 30 0
7 7 500 0
8 4 200 0
Now I want to create colomn E to show the remaining volume of each seller. I want to look up the ID of the seller that delivered volume (the non-zero volume in column D and deduct the delivered volume from that seller.
I can't just use E=C-D because then it won't pick up the correct volume for channel 4 and 7. I can't use pivot table because this is part of an optimization model and i need the calculation to flow through automatically. Thanks!!
A B C D E
1 5 100 0
2 3 20 0
3 7 500 3
4 7 500 0
5 1 90 0
6 2 30 0
7 7 500 0
8 4 200 0