Reputation: 87
My problem might be simple but i have been stuck on it for a while. I have a list of accounts in column B (XXXXXX). Then in column D i have a quantity of contracts traded. In the column E i have the prices of those contracts. The column next to it has the name of the product traded.
The way i get the raw data i sometimes get a trade split in 2 parts. For example i might have on one row for the same (column B) account XXXXXX , QTY(Column D) 2 and Price(column E) 5.23$ and security(column F) NKE. In the next row i have the same account XXXXX , QTY is 3 , Price is same and the security is same. I want something that will loop through the entire data and add the QTY to 5 and keep everything else the same. So at the end i should have one row with with account XXXXXX with QTY 5 Price 5.23$ and Security NKE. I have tried pivot tables but it adds the price of the security to 10.46$ and that messes up calculations. I cannot figure what sort of a macro i should use. Can someone please help. I am posting a picture to help understand the problem. THanks. enter image description here
Upvotes: 0
Views: 163
Reputation: 87
To the person who posted a macro. Can you please repost? I was just writing a note to you and I see you deleted the comment
Upvotes: 0
Reputation: 348
A pivot should show you what you want. Don't put Price in VALUES. Account, Security and Price can go in ROWS then Sum of Quantity in VALUES. That should give you the breakdown you're after.
Upvotes: 1
Reputation: 3573
Upvotes: 0