+ Reply to Thread
Results 1 to 5 of 5

How to count only the first entry and not the duplicates

  1. #1
    Registered User
    Join Date
    05-24-2016
    Location
    new york city
    MS-Off Ver
    2011
    Posts
    3

    Angry How to count only the first entry and not the duplicates

    I have five columns and I want to add up the Wages for each person on each date, so I used a formula
    =SUMIFS($C$2:$C$11,$A$2:$A$11,"=" & A2, $B$2:$B$11,"=" & B2). But then I got duplicates because it added all the wages for all days for each date instead of doing it for the first occurrence and then making the rest equal to zero. I need a better formula that sums the dates up and makes the follow up numbers equal zero. For example Name A on 1/1/2016 shows up twice and should equal to 7(5+2) on the day he gets paid 5 and should equal 0 on the day he gets paid 2. Sorry for taking up your time and thank you in advance.

    Name- Date -Wage -It should be -What I get after I use the formula
    a- 1/1/2016- - 5 - -7- - 7
    b- 1/3/2016- - 8 - -8 - - 8
    c- 1/4/2016- - 1 - -1 - - 1
    c- 1/2/2016- - 1 - -1- - 1
    a- 1/1/2016- - 2 - -0- - 7 WRONG
    d- 1/1/2016- - 6 - - 6 - - 6
    b- 1/3/2016- - 0 - -0 - - 8 WRONG
    b- 1/5/2016- - 3 - - 3 - - 3
    c- 1/2/2016- - 0 - - 0- - 1 WRONG
    a- 1/22/2016- - 8 - - 8- - 8

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: How to count only the first entry and not the duplicates

    Hi -

    Try this:

    =IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)>1,0,SUMIFS($C$2:$C$11,$A$2:$A$11,A2, $B$2:$B$11,B2))
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Registered User
    Join Date
    05-24-2016
    Location
    new york city
    MS-Off Ver
    2011
    Posts
    3

    Re: How to count only the first entry and not the duplicates

    Hi,

    It worked thank you so much.

  4. #4
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: How to count only the first entry and not the duplicates

    Great! Glad I could help. If you are satisfied with this result, please edit your thread title to add the word SOLVED per the instructions at the bottom of this post.

  5. #5
    Registered User
    Join Date
    05-24-2016
    Location
    new york city
    MS-Off Ver
    2011
    Posts
    3

    Re: How to count only the first entry and not the duplicates

    Done thank you again.

+ 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] Select every second entry, no duplicates
    By ANDREAAS in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-04-2015, 02:31 AM
  2. [SOLVED] Count duplicates and duplicates with suffix as one instance
    By ruraljur0r in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-24-2014, 12:38 AM
  3. Remove duplicates and keep oldest entry
    By Bond007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 12:22 PM
  4. Removing duplicates in a count, count based on value in a different cell
    By omf_24 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-10-2013, 07:08 AM
  5. I want find duplicates entry after first entry in list b from list a
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2013, 05:47 PM
  6. [SOLVED] Duplicates entry
    By mdshotgun in forum Excel General
    Replies: 7
    Last Post: 05-22-2012, 11:03 PM
  7. How to prevent duplicates entry in Combobox
    By bhagwat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2009, 05:02 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