I use a multi-tab workbook which calculates stock trades. One of its tabs is a "trade list" which looks like the first tab on the attached workbook.
The first challenge is to remove rows which have no activity. I think I could probably fix that problem using a pivot table (although I've never mastered these. If the data in my main workbook changes, will the pivot table change accordingly?)
The more complex challenge for me is that I need to reformat the trade list so that it looks like the one on the second tab. In the second tab, a single row will include both the opening and closing info. for each trade. (e.g. date, price, ticker, volume, profit)
Sometimes, the trading strategy will open two trades on different dates, then close both of them out on another day. This is what you'll see with the first trade.
So... How do I match a trade's closing data to a trade's opening data so that it looks like the second tab? (I've manually plugged in about 6 trades so you can see where I got the data from on the first tab). Could I assign a unique number to each trade as a "helper"? (and how would I do that?)
Note that the example worksheet uses color to indicate each full trade.
Please let me know if I need to clarify anything! I very much appreciate your help.
EDIT: I've marked this thread as "solved" because I'm going to post a similar thread in the commercial forum.
Bookmarks