+ Reply to Thread
Results 1 to 10 of 10

Delete repeated rows in a list

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    7

    Question Delete repeated rows in a list

    Hi, I'm from Ecuador. I need some help. I'll explain what I need.

    I have a list with many rows. All the rows have information about electrical measures. The measures were done each 15 minutes, approximately. But some rows have the same information. For example, the measures on "01 de marzo de 2013 12:00:00" are the same as "01 de marzo de 2013 11:59:58". I need to delete the repeated information and send it to another sheet in the same document. In the next example, the rows 1 and 2 are the same, also 3 and 4, and 6 and 7.


    Date a b c d
    01 de marzo de 2013 11:59:58 120 30 45 0.9
    01 de marzo de 2013 12:00:00 120 30 45 0.9
    01 de marzo de 2013 12:14:59 118 31 44.6 0.92
    01 de marzo de 2013 12:15:00 118 31 44.6 0.92
    01 de marzo de 2013 12:29:55 121 32 43.4 0.89
    01 de marzo de 2013 12:44:50 123 34 43 0.88
    01 de marzo de 2013 12:44:58 123 34 43 0.88


    I need to reduce to:

    Date a b c d
    01 de marzo de 2013 12:00:00 120 30 45 0.9
    01 de marzo de 2013 12:15:00 118 31 44.6 0.92
    01 de marzo de 2013 12:29:55 121 32 43.4 0.89
    01 de marzo de 2013 12:44:58 123 34 43 0.88

    How can I do it?

    Thanks
    Attached Files Attached Files
    Last edited by jluiz; 03-13-2013 at 05:09 PM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete repeated rows in a list

    Please attach a sample excel book. Go to advance then attachment. It is diffcult to see the result in text format

  3. #3
    Registered User
    Join Date
    03-13-2013
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete repeated rows in a list

    Hi AB33. I've attached a sample. In this sample, I have two tables. The table "Measures" have all the information and repeated rows. I need to reduce this table to "Measure Resume". This table don't have any repeated row.

  4. #4
    Registered User
    Join Date
    03-13-2013
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete repeated rows in a list

    Quote Originally Posted by AB33 View Post
    Please attach a sample excel book. Go to advance then attachment. It is diffcult to see the result in text format
    Hi AB33. I've attached a sample. In this sample, I have two tables. The table "Measures" have all the information and repeated rows. I need to reduce this table to "Measure Resume". This table don't have any repeated row. Can you help me please?

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete repeated rows in a list

    I do not know in which column A are the duplicates, but have assumed column B, but can easily change it if this is not the case.
    I have also attached two codes. one code output is on the same sheet and the other one on different sheet.
    I have also assumed that once the dups are copied, I have deleted them from the original source. This is also can easily being changed.
    Attached Files Attached Files
    Last edited by AB33; 03-14-2013 at 05:47 AM.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Delete repeated rows in a list

    Here's my interpretation of your problem.
    The results are slightly different from yours.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-13-2013
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete repeated rows in a list

    Quote Originally Posted by AB33 View Post
    I do not know in which column A are the duplicates, but have assumed column B, but can easily change it if this is not the case.
    I have also attached two codes. one code output is on the same sheet and the other one on different sheet.
    I have also assumed that once the dups are copied, I have deleted them from the original source. This is also can easily being changed.
    Hi AB33. Thanks for your help. I have a little problem with the algorithm. I'll try to increase new rows below the existent rows in the sheet measure, but the macro only returns a table with 4 rows.
    I'll explain you what I need to do. I've modified my file "measures" for a better explanation of the problem.
    In the sheet called "Measures", I've painted with a different color all the repeated rows. The difference between each repeated pair is only the hour in the first column, for example: 11:59:54 and 12:00:00. But the other information (2nd column, etc.) is the same. I need only a row for each repeated pair.
    But there are also some rows that aren't repeated. I didn't paint these rows. These rows haven't be deleted.
    In the sheet called "Resume", I've put the table that I need.

    I'd be very grateful with you if you can explain me how to solve this problem

    Thank you very much
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-13-2013
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete repeated rows in a list

    Quote Originally Posted by jindon View Post
    Here's my interpretation of your problem.
    The results are slightly different from yours.
    Hi jindon. Thank you for your help. II'll try to increase new rows below the existent rows in the sheet "Measure", but the macro only returns a table with 4 rows. Many rows are superimpose between them.
    I'll explain you what I have to do. I've modified my file "measures" for a better explanation of the problem.
    In the sheet called "Measures", I've painted with a different color all the repeated rows. The difference between each repeated pair is only the hour writed in the first column, for example: 11:59:54 and 12:00:00. But the other information is the same. I need only a row for each repeated pair.
    But there are also some rows that aren't repeated. I didn't paint these rows. These rows haven't be deleted.
    In the sheet called "Resume", I've put the table that I need to obtain.

    Thanks for your time and for your help.

    Sorry that I ask very things, but I only know very little of Excel macros.

    measures.xlsx

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Delete repeated rows in a list

    My understanding of "Duplicates" in this case was from co.B to col.G.

    So, I don't think I understand your problem.

  10. #10
    Registered User
    Join Date
    03-13-2013
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete repeated rows in a list

    Quote Originally Posted by jindon View Post
    My understanding of "Duplicates" in this case was from co.B to col.G.

    So, I don't think I understand your problem.

    Thanks jindon. Don't worry. I've resolved that using your and ABB3 macros. But I still have a question to solve.

    I need to obtain the dates in the first column, for example "1-JAN-2013 00:45:00.017", but in the sheet I see some as "41275.03125". I'll try to change the format in Excel a "dd-mmm-yyyy hh:mm:ss.sss", but the result is "1-ene-2013 00:45:00.00". I need to see "1-JAN-2013 00:45:00.017". Can you help me please?

    I don't know if this problem is due to the language.

    Thanks
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1