• 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.

duplicating a row once or twice dependant on a cell value in another sheet

Hey Luke, how are you? hope all is well

I was wondering if you could point me in the right direction please?

i am struggling to find out the correct terminology to describe what I would like to do and as you were soo good at being able to understand my rabble I thought I would come back and ask you.

I have attached a worksheet, the yellow highlighted rows represent rows which have another duplicate or triplicate or quadruplicate row with the same reference number (ROW C).

I am trying to combine these rows which have the same reference number so that I end up with one row which contains the same information from A : I as the original rows , but sums up the data in Columns M,N & P of all the rows with the same reference number

I hope this makes sense?

Is there a term for this kind of thing i should research?

Thank you in advance for any help you may be able to give me

:)
 

Attachments

  • combining 1.xlsx
    31.5 KB · Views: 1
Welcome back!

My first attack, because it's the fastest, would be to actually create a PivotTable. Assuming you've got some header row (or you could make one), then put col A:I in Row field area, in correct order, and M, N, and P into Data field area. The PT will automatically SUM those columns which are duplicates.
 

Attachments

  • combining PT.xlsx
    66 KB · Views: 1
Oooo I didnt think of using a pivot table :)

Would i be able to code this in so that this could be automated leaving me with a format like that in the example spreadsheet?
 
Certainly. I'd probably record a macro of yourself performing the actions needed, and then look at the code and "clean up" where needed (removing window scrolls, unnecessary selections, etc.)
 
Back
Top