Remove duplicate rows with sum of a column in excel - VBA

  • Hello All,




    I have an Excel 2013 spreadsheet with multiple columns (A,B,C,D,E,F) [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 607"]

    [tr]


    [TD="colspan: 6"]Actual Data[/TD]

    [/tr]


    [tr]


    [td]

    Manager

    [/td]


    [td]

    Project

    [/td]


    [td]

    Name

    [/td]


    [td]

    Code

    [/td]


    [td]

    Service Deliver

    [/td]


    [td]

    Worked Hours

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    2.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    2.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    2.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    2.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    4.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    5.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    2.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    6.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    No Work

    [/td]


    [td]

    2.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    XYZ

    [/td]


    [td]

    579

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    3.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    XYZ

    [/td]


    [td]

    579

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    2.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    XYZ

    [/td]


    [td]

    579

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    3.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    XYZ

    [/td]


    [td]

    579

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    4.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    No Work

    [/td]


    [td]

    2.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    No Work

    [/td]


    [td]

    2.0

    [/td]


    [/tr]


    [/TABLE]
    I want to remove the duplicates rows by grouping data columns (A,B,C,D,E) but summing the values in the F column corresponding to the repeating rows as shown in below image.
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 607"]

    [tr]


    [TD="colspan: 6"]Expected Result[/TD]

    [/tr]


    [tr]


    [td]

    Date Worked

    [/td]


    [td]

    Project

    [/td]


    [td]

    Name

    [/td]


    [td]

    Code

    [/td]


    [td]

    Service Deliver

    [/td]


    [td]

    Worked Hours

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    5.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    4.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    ABC

    [/td]


    [td]

    932

    [/td]


    [td]

    No Work

    [/td]


    [td]

    4.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    9.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    8.5

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    Ram

    [/td]


    [td]

    123

    [/td]


    [td]

    No Work

    [/td]


    [td]

    2.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 1

    [/td]


    [td]

    XYZ

    [/td]


    [td]

    579

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    5.0

    [/td]


    [/tr]


    [tr]


    [td]

    ZZZZ

    [/td]


    [td]

    Project 2

    [/td]


    [td]

    XYZ

    [/td]


    [td]

    579

    [/td]


    [td]

    Quality Check

    [/td]


    [td]

    7.0

    [/td]


    [/tr]


    [/TABLE]

  • crossposted: https://www.mrexcel.com/forum/…e-urgent.html#post4923674


    MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question

    /*/

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!