![]() |
Merging duplicate data across multiple columns
G'day,
A quick outline of my problem. I am trying to create a worksheet tha takes data from other worksheets that list an output of time an events for up to 200 runs of a simulation. What I have been able to d is to bring the data into the worksheet and sort it such that th duplicate data sorted. What I would like to do is to take th individual rows and check for duplicate times and then, if a duplicat exists, merge the rows such that the data remains in the origina columns but is compressed into one row. Can any one help? I hav attached a sample of the worksheet to illustrate where I am at. Thank Attachment filename: example.xls Download attachment: http://www.excelforum.com/attachment.php?postid=51772 -- Message posted from http://www.ExcelForum.com |
Merging duplicate data across multiple columns
I think I have a method to do this but the coding is still a bit hazy.
Methodology is this: count the total no. of rows filled in the first column. Use this variable to begin an iterative check of column 1 comparin each value against the previous value ( ie row x against row x-1). If a match is found then begin an iteration of the row x-1 columns iteration defined by the no of runs of the simulation( set on seperate worksheet), and if a value is found paste that value into th same column of row x. Once this is done then delete row x-1. then continue the iterativ check of column 1 -- Message posted from http://www.ExcelForum.com |
Merging duplicate data across multiple columns
Well I solved it after all. The following is the code I used. A bi
clunky but it works. Maybe someone will clean it up but for now I' happy Attachment filename: sub calc.txt Download attachment: http://www.excelforum.com/attachment.php?postid=52543 -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 09:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com