I want to summarize net number of stocks traded by each trader. How to use VBA to do so? How to deal with buy and sell to get the net number? A sample is attached.
Thanks
I want to summarize net number of stocks traded by each trader. How to use VBA to do so? How to deal with buy and sell to get the net number? A sample is attached.
Thanks
Last edited by poppypoppy; 06-14-2010 at 11:40 AM.
Try a SUMPRODUCT formula to calculate the difference between the sum of sold and sum of bought.
In cell H27 of your sample workbook:
=SUMPRODUCT(--($F$1:$F$15="S"),--($H$1:$H$15=$G27),($G$1:$G$15))-SUMPRODUCT(--($F$1:$F$15="B"),--($H$1:$H$15=$G27),($G$1:$G$15))
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Thanks Palmetto.
Last edited by poppypoppy; 06-14-2010 at 11:40 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks