Collapsing trading data from client allocations to get a total execution figure for the day

mozza90

New Member
Joined
Mar 19, 2015
Messages
32
Hi Folks,

I'm struggling to manipulate a data set I have and am hoping someone can help with a solution either in VBA/Pivot table/formula. I have a list of trades which are executed, then this trade is split down among a group of clients. For example, we buy 1,000 MSFT US @ $10 per share. These 1,000 shares are then split down and allocated to some clients. So Jack gets 300, Jill gets 500 and Jenny gets 200.

When I receive the data, I get the client breakdown rather than the total executed on the day. Below is an example:

TickerTrade DateQuantityPriceBrokerClient Name
MSFT US09/15/201730010Broker1Jack
MSFT US09/15/201750010Broker1Jill
MSFT US09/15/201720010Broker1Jenny
RDSA LN09/15/201710005Broker2Paul
RDSA LN09/15/20173005Broker2Susie
RDSA LN09/15/20175004.99Broker1Jenny

<tbody>
</tbody>

I'd like this data to be:

TickerTrade DateQuantityPriceBrokerClient Name
MSFT US09/15/2017100010Broker1
RDSA LN09/15/201713005Broker2
RDSA LN09/15/20175004.99Broker1

<tbody>
</tbody>

The main considerations are:
1) Sum quantity if ticker, trade date and broker are all the same
2) Price should be the price, e.g. 10, not 30 in the above example

Also to note, I could have a data set of trades over a week or month so the trade date changes. We could trade the same ticker with different brokers on the same day, so these need to be separate rows. Client name is irrelevant once the trade is totaled (it can have a name there if it is easier, but it doesn't matter).

Whilst using a pivot table does sum all of this data for me, I then need to take this data and perform further calculations using the total executed on the day. This makes the pivot table difficult to use for a 1000+ row data set. Is there a simpler way to summarise this data?

Thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi,

Using your original data create a pivot table:

Row area Ticker, Trade date, Price, Broker
Values area Quantity.

Now go onto the ribon (whilst in the pivot table) and select analyze, options, Display and tick the "classic pivot table layout" box.

In the pivot table remove totals as required to get the layout you want.

You can now prioritise the layout for price and broker depending on your requirements.

Good luck.
 
Upvote 0
That's great and works perfectly. I didn't know there was a way to select classic layout, solves all the issues I was having with the new format pivot tables.

Thank you!
 
Upvote 0
That's great and works perfectly. I didn't know there was a way to select classic layout, solves all the issues I was having with the new format pivot tables.

Thank you!

You're Welcome

Yes ! Not every improvement is an Improvement. I mush prefer the "classic" layout.
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top