Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Merge rows into one based on value
OK, I know there should be an easy way to do this, but...
I want/need to automate a process wherein a downloaded worksheet has one or more instances where there are two or more rows of data for a particular quantity. What I need is to total the values of certain columns in those rows for the matching cells and replace the values in (say) the last of the matching rows w/ the sum, then remove the extra rows of partial data. My attempts have failed to do this in anything at all approaching a clean method. Can someone give an outline of a macro that would do such an operation as a model? Thanks. Example-- Symbol #Shares Cost Close Value ABCD 324 31.21 34.55 11194.20 ... ABCD 25 33.00 34.55 863.75 ... BDDE 100 14.44 12.22 1222.00 ... .... Wanted end result Symbol #Shares Cost Close Value ABCD 349 31.34 34.55 12057.95 ... BDDE 100 14.44 12.22 1222.00 ... .... where the cost is the (weighted) average cost and the value is the total... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
return multiple rows of data based on criteria | Excel Worksheet Functions | |||
sorting rows based upon formatting | Excel Discussion (Misc queries) | |||
Outlining - collapse rows based on repeated column value | Excel Discussion (Misc queries) | |||
Merge from Excel to Word - why are only even rows merged? | Excel Discussion (Misc queries) | |||
Merge two rows into one, then merge into mailer? | Excel Worksheet Functions |