+ Reply to Thread
Results 1 to 8 of 8

if column A and B got duplicates then sum only one row of Column C

  1. #1
    Registered User
    Join Date
    01-29-2017
    Location
    NEW YORK
    MS-Off Ver
    365
    Posts
    16

    if column A and B got duplicates then sum only one row of Column C

    I got two similar columns with the same data but I'm trying to sum only the first row of column C


    https://app.box.com/folder/0

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,268

    Re: if column A and B got duplicates then sum only one row of Column C

    Hi,

    See the attached where I've done two helper columns to do your problem in two ways. You need the second helper in some way to see which is first. Hope this example helps.

    Only use first of duplicates.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: if column A and B got duplicates then sum only one row of Column C

    Hard to say from your very limited example. Maybe, in D2 copied down

    =IF(COUNTIF($A$2:$A2, A2)=1, C2, 0)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    01-29-2017
    Location
    NEW YORK
    MS-Off Ver
    365
    Posts
    16

    Re: if column A and B got duplicates then sum only one row of Column C

    Not exactly, I have many more line items. This is my fault.
    I revised the example
    Thanks


    https://app.box.com/folder/0
    Last edited by excelsql987; 04-25-2017 at 09:17 AM.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: if column A and B got duplicates then sum only one row of Column C

    You need to revise the example that you uploaded to this site as I do not have a App.box account to sign in to.

  6. #6
    Registered User
    Join Date
    01-29-2017
    Location
    NEW YORK
    MS-Off Ver
    365
    Posts
    16

    Re: if column A and B got duplicates then sum only one row of Column C

    SumIfColumnsAreDuplicated.png

    I hope this works better

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: if column A and B got duplicates then sum only one row of Column C

    Yes, that's what my formula does.
    Did you try it? Note: it works because the second and third "A2" are not anchored.

  8. #8
    Registered User
    Join Date
    01-29-2017
    Location
    NEW YORK
    MS-Off Ver
    365
    Posts
    16

    Re: if column A and B got duplicates then sum only one row of Column C

    Thanks a lot ChemistB , your formula : =IF(COUNTIF($A$2:$A2, A2)=1, C2, 0) works perfectly.
    I guess I'm still puzzled because your formula ignores column "B"
    but still I get the accurate results and that's what matter.

    Thanks again for your quick help.

+ 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] Add up quantitites in Column E based on duplicates in Column A, then delete duplicates
    By eli-vergara in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2016, 05:44 PM
  2. Find duplicates in one column & add data from another column to duplicate-free sheet
    By ingiabouzeid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2013, 03:37 AM
  3. [SOLVED] Find duplicates in column A, add values from column B (possibly delete duplicates)
    By luarwhite in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2013, 04:34 PM
  4. [SOLVED] Macro to count unique values in a column, enter it in next column, then delete duplicates
    By pmorisse in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2013, 03:27 PM
  5. comparing the column headers, then deleting the entire column iif duplicates occur
    By vindieselgal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2011, 04:53 AM
  6. Script to check for duplicates in one column then alter adjacent column values
    By SebN in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2010, 12:23 PM

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