+ Reply to Thread
Results 1 to 4 of 4

How to sum values and remove duplicates rows

  1. #1
    Registered User
    Join Date
    02-01-2022
    Location
    uk
    MS-Off Ver
    123
    Posts
    2

    How to sum values and remove duplicates rows

    Hi All,

    I'm trying to remove duplicates and sum values. I have table which is looks like that.
    item number client Date Quantity
    167 C10000038 28/01/2022 3
    167 C10000038 28/01/2022 3
    167 C10000038 30/01/2022 3

    please see code what i use below, it doesn't work properly, I have already blow my mind how to solve it.


    Please Login or Register  to view this content.

  2. #2
    Forum Guru Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to sum values and remove duplicates rows

    What's your definition of distinct rows? Is it the combination of Item Number and Client? If so, which date / quantity do you want returned?

    Would be useful to show us a manually created (mocked up) sample of your required output, as well as the input.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    02-01-2022
    Location
    uk
    MS-Off Ver
    123
    Posts
    2

    Re: How to sum values and remove duplicates rows

    Quote Originally Posted by Olly View Post
    What's your definition of distinct rows? Is it the combination of Item Number and Client? If so, which date / quantity do you want returned?

    Would be useful to show us a manually created (mocked up) sample of your required output, as well as the input.
    I have used Pivot table before but I'm trying to automate the process. basically my primary fields are item number, client, date, the result what im trying to reach is no duplicates and if there some duplicates then sum the quantity and remove the row.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    11,138

    Re: How to sum values and remove duplicates rows

    So with this small list offered above...Result will be...
    item number client Date Quantity
    167 C10000038 28/01/2022 9
    Which date however takes precedent...28 or 30

    If the below is not what you are wanting then...I suggest uploading a sample file with more than 1 duplicate entry and show expected result...
    Please Login or Register  to view this content.
    Last edited by sintek; 02-06-2022 at 08:26 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sum duplicates values and remove rows
    By Hamsan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-28-2016, 03:25 AM
  2. How to remove duplicates AND values that have duplicates?
    By bachfantasia in forum Excel General
    Replies: 9
    Last Post: 05-13-2014, 07:05 PM
  3. [SOLVED] Find duplicates rows, sum cells then remove duplcate rows
    By Wagstaff in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-22-2013, 09:37 AM
  4. Remove Duplicates from Rows
    By dwc in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-24-2013, 06:47 AM
  5. Replies: 1
    Last Post: 10-23-2012, 09:12 AM
  6. Macro to remove duplicates values and keep unique values bases on multiple criteria
    By Ricker090 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2011, 04:37 PM
  7. Remove row duplicates depending on values from other rows
    By soli004 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-22-2011, 06:09 PM

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