+ Reply to Thread
Results 1 to 10 of 10

Formula to Add unique and Duplicate entries

  1. #1
    Registered User
    Join Date
    11-07-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    84

    Formula to Add unique and Duplicate entries

    Dear All,
    I have a problem as shown in the attached file

    I want to sum my Ref No. (Col C)

    If it is unique then the Total should show of the same row and
    if the Ref no. is repeated then it should sum both the values in the Total Column.

    I have made Col F as my desired result required
    TIA
    Sameer
    Last edited by sameer79; 08-07-2019 at 02:15 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to Add unique and Duplicate entries

    No file attached

    Use the Go Advanced option at the bottom of the page then scroll down to Manage Attachments as the "paperclip" method does not work on this forum.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    11-07-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    84

    Re: Formula to Add unique and Duplicate entries

    Sorry
    Missed it
    Here it is
    Thanks
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Formula to Add unique and Duplicate entries

    Try this in F2 copied down:

    =IF(B2&C2=B1&C1,0,SUMIFS(E$2:E$38,C$2:C$38,C2,B$2:B$38,B2))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to Add unique and Duplicate entries

    I'm thinking Pivot Table (which I don't know much about) or PowerQuery (which I know nothing about).

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Formula to Add unique and Duplicate entries

    PowerQuery would require the downloading of the add-in if the OP is still using 2010, but yes, the data could be aggregated. However, the result would NOT be what the OP is showing in the sample file, either with PQ or a pivot table: it would be a summary view.

  7. #7
    Registered User
    Join Date
    11-07-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    84

    Re: Formula to Add unique and Duplicate entries

    Thanks a lot
    Perfect solution
    Rep added and post marked SOLVED

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Formula to Add unique and Duplicate entries

    No problem.

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,605

    Re: Formula to Add unique and Duplicate entries

    In G2 then copy down.

    =IF(COUNTIF($C$2:C2,C2)=1,SUMIF($C$2:$C$38,C2,$E$2:$E$38),"")
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  10. #10
    Registered User
    Join Date
    11-07-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    84

    Re: Formula to Add unique and Duplicate entries

    Thanks a lot
    Your solution also works perfectly

+ 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. Creating a unique list from a table with duplicate entries
    By HKPHOOY in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-30-2019, 12:06 PM
  2. [SOLVED] Highlight a unique value with duplicate entries
    By scotland9 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2015, 09:47 AM
  3. Help merging duplicate entries with unique information
    By wizelsnarf in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2014, 03:02 PM
  4. Replies: 1
    Last Post: 01-20-2012, 09:09 PM
  5. Duplicate Entries into List of Unique Entries
    By MjRmatt in forum Excel General
    Replies: 1
    Last Post: 08-18-2010, 11:53 AM
  6. COUNTING Duplicate and Unique Entries
    By flamins in forum Excel General
    Replies: 3
    Last Post: 10-24-2006, 06:53 AM
  7. Replies: 3
    Last Post: 03-08-2005, 03:06 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