A | B | C | D | ||
1 | Company | Units | Price | date | |
2 | X | 100 | 10 |
<tbody> </tbody> | |
3 | X | 100 | 20 |
<tbody> </tbody> | |
4 | X | 100 | 15 |
<tbody> </tbody> | |
5 | Z | 150 | 100 |
<tbody> </tbody> | |
6 | Z | 150 | 200 |
<tbody> </tbody> | |
7 | X | 100 | 17 |
<tbody> </tbody> |
<tbody>
</tbody>
Hello,
This is a very simplified table, i have thousands of trades and more than hundred companies with multiple trades of the same company in any one given day. I am struggling to come up with a formula which looks up the company name and the date and aggregates the total amount of shares purchased (units) references the date and company name. Then I also need to get the average price which i would use a sumproduct formula (units x price) divided with sum of the units but some how need to incorporate index match for look up.
In another sheet i would have the aggregated data.
Company | X | X | Z | Z |
date | units | price | units | price |
20/04/2017 | ||||
21/04/2017 | ||||
22/04/2017 | ||||
23/04/2017 |
<tbody>
</tbody>
Help to solve this problem would be much appreciated.
Thx up front.