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

Sum if not duplicate

rsomist

Member
I have a worksheet that consists of 6 columns. I am wanting to add up numbers from column E into column F, but only if it's not a duplicate line, as seen in column B. In the example I am attaching, lines 1 and 10 are duplicates, so that should not be included in the sum value. Thanks for any help!
 
Sorry, I guess it didn't save. Adding it now and I'll check out your link - thank you!
 

Attachments

  • Test Workbook.xlsx
    9 KB · Views: 7
That link addresses the unique value part, but only references 1 range that I can see. I need to compare two different columns and remove the duplicates from each of those two ranges.
 
Right - that's where I would want the sum totals to go from column E, so the cells that I would need to enter in the function? So add up numbers from E with that total showing in F as a running total, assuming there's no duplicates (like row 10 in the attachment.)

Hello,
column F is blank?!
 
I'm confused by your sample sheet as well. What column(s) identify line as duplicate?

Column B is enough as you stated in OP? Or do you need to use some other column as well?

As well, isn't rows 11 to 15 duplicate as well? If it isn't, then what make them different from row 10?
 
Ok, I think I oversimplified the example worksheet and just made it more confusing. Let me add another one and see if I can explain it a little better.

In column A, I have a list of ID's. There will be multiple duplicate ID's and then a new ID. At each change in ID, I need a new grand sum in column F. At the same time, I need any duplicated line numbers from column B (within the same ID number from column A) to not be included in the grand total in column F.

I have included the totals I am looking for the function to generate in column F. Here is one of the functions I have tried:

=SUMPRODUCT(--($A$21:$A$38=A21),$E$21:$E$38)
This function works to sum the totals with each change in ID number from column A, but does not address the duplicate line number problem.

Sorry for all of the confusion. Hope this helps clear some of it up.
 

Attachments

  • Test Workbook 2.xlsx
    10.8 KB · Views: 6
Back
Top