+ Reply to Thread
Results 1 to 5 of 5

Sum without duplicates based on criteria from different cells

Hybrid View

  1. #1
    Registered User
    Join Date
    11-30-2011
    Location
    Sactown
    MS-Off Ver
    Excel 2007
    Posts
    6

    Sum without duplicates based on criteria from different cells

    I am able to sum the "#of accounts" worked by month on the Summary tab based on the data on the CSO tab. I also need the sum #of accounts worked without duplicates based on the ID#. I have tried multiple ways and can't get it to total correctly.

    I would expect B7 on the summary page to be 8 (5+2+1) when the duplicate ID#'s are ignored for that month.

    Any suggestions?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Sum without duplicates based on criteria from different cells

    Hi

    Select B7 on Summary, and create a new defined name with a name of rng, and a refers to: =OFFSET(CSO!$A$1,MATCH(Summary!B$3,CSO!$A:$A),0,SUM((MONTH(CSO!$A$5:$A$5000)=MONTH(Summary!B$3))*1),1)

    B7: =IFERROR(SUM(OFFSET(rng,0,3)/COUNTIF(OFFSET(rng,0,2),OFFSET(rng,0,2))),"") This formula is array entered (ctrl, shift, enter). Copy across from B7 to M7.

    HTH

    rylo

  3. #3
    Registered User
    Join Date
    11-30-2011
    Location
    Sactown
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sum without duplicates based on criteria from different cells

    Thanks for the suggestion. At first it looked like this worked correctly for my needs but after testing it won't work. I think it is because it is referencing the match on the date not the ID#???

    If I sort by the date the summary value changes or if a user enters a date out of order it will not display correctly.

    I need a sum of Column D for only 1 instance of each ID# in Column C. Any other sugestions?
    Last edited by perryadam; 04-24-2013 at 11:08 AM.

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Sum without duplicates based on criteria from different cells

    try this array formula:
    Formula: copy to clipboard
    =SUM((MONTH(CSO!$A$5:$A$16)=MONTH(B$3))*(MATCH(MONTH(CSO!$A$5:$A$16)&CSO!$C$5:$C$16,MONTH(CSO!$A$5:$A$16)&CSO!$C$5:$C$16,0)=ROW(CSO!$C$5:$C$16)-ROW(CSO!$C$5)+1)*(CSO!$D$5:$D$16))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    11-30-2011
    Location
    Sactown
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sum without duplicates based on criteria from different cells

    Thank you this worked perfect....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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