LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 390
Default Combining complex data

Hi, folks,

Given a sheet of data about stock sales, I want to combine the lots
that were sold on the same day for the same price for the same
stock symbols.

For example, say I have:

A B C D E F G H I
1 Symbol Shares Date Bot PPrice Cost Date Sold SPrice Proceeds G/L
2 TSRA 100 3/1/2007 38.56 3,856.00 3/21/2007 41.05 4,104.93 248.93
3 TSRA 100 3/5/2007 37.66 3,766.00 3/21/2007 41.64 4,163.93 397.93
4 TSRA 30 3/2/2007 38.56 1,156.80 3/21/2007 41.05 1,231.48 74.68
5 TSRA 30 3/5/2007 37.66 1,129.80 4/5/2007 42.03 1,260.88 131.08
6 XRX 10 3/2/2007 16.86 168.60 4/18/2007 18.12 181.20 12.60
7 XRX 290 3/2/2007 16.86 4,889.40 4/20/2007 18.68 5,417.02 527.62
8 XRX 290 2/27/2007 17.36 5,034.40 4/18/2007 18.12 5,254.71 220.31

I will be writing lines to a new worksheet and combining the lots.
So lines 2 and 4 as well as lines 6 and 8 will have their data
combined.

Column B on the new sheet for that sale will say, for lines 2 & 4,
130 shares. For lines 6 & 8, 300 shares. I'll average the date
bought, weighted based on the dollar amount of the sale. Ditto
purchase price. Cost ought to still be the sum of the combined
cost lines. Date Sold doesn't change -- it's one of the bases for
combining data. Ditto Sale Price. Proceeds will be a simple
sum, as will gain/loss. Any ideas would be much appreciated.

--
dman
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex Data Validation Sean Excel Discussion (Misc queries) 1 March 21st 07 08:01 AM
complex data validation maryj Excel Discussion (Misc queries) 4 December 28th 06 06:02 PM
Highly Complex Totals of Data PaulW Excel Discussion (Misc queries) 5 December 28th 06 05:05 PM
chart data range too complex likes2cook Charts and Charting in Excel 5 December 19th 06 01:20 AM
Combining Text Strings - Complex ksawyers Excel Worksheet Functions 1 August 9th 05 08:11 PM


All times are GMT +1. The time now is 02:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"