• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Aggregating multiple rows of data using vba code

raj saha

New Member
Hello everyone. I am in the process of building an options portfolio manager. i am trying to merge and aggregate multiple rows of similar data based on specific criteria. if information in columns b, c,e,f,g are the same then combine into a single row. also only columns d,m,n,o,p,q,r,s,u should be added together. once its aggregated all the rows i would like to replace all the data on that sheet with new merged rows. i have attached a spreadsheet that should make it easier to understand what i am trying to accomplish. thank you for all your help and advice.

upload_2015-9-10_15-49-10.png
 

Attachments

  • chandoo aggregation of multiple rows.xlsm
    25.4 KB · Views: 10
Try using Pivot Table?

Only issue is tjat Qty must be in VALUES field since there's calculation being done on it, and must occur to right of "Prv. Settle".
 

Attachments

  • chandoo aggregation of multiple rows_PT.xlsm
    29.6 KB · Views: 10
chichiro,

thank you very much for the suggestion. how did you get the pivot table to look the way it does. i cant seem to be able to replicate the same format that you have.

thanks.
 
Go to PivotTable Options->"Display" tab, check "Classic PviotTable layout"
upload_2015-9-11_12-22-59.png

For each ROWS (Row Labels), ungroup them and right click on the label and remove "Subtotal".
upload_2015-9-11_12-24-41.png

Then go to "Field Setting" of each ROWS and go to "Layout & Print" tab, check "Repeat item labels".
upload_2015-9-11_12-26-36.png
 
Back
Top