+ Reply to Thread
Results 1 to 8 of 8

Need to SUM units based on multiple criteria while ignoring duplicate dates

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    Seattle, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Need to SUM units based on multiple criteria while ignoring duplicate dates

    I have a worksheet that I need help on (See attached).

    I need a formula that can track the total # of people impacted (Column 'E') per presenter (Column 'A') , but I need the formula to be able to account for lessons that occured on the same day (Column 'C').

    Example:

    A ............B...............C..........D.....E
    Arun....Lesson 5.....14-Nov...3.75...18
    Arun....Lesson 8.....14-Nov...3.75...18
    Arun....Lesson 11...14-Nov... 3.75...18
    Arun....Lesson 9.....10-Oct....3.75...30
    Arun....Lesson 10...31-Oct....3.75...31
    Sam....Lesson 5.....14-Nov...3.75...18
    Sam....Lesson 8.....14-Nov...3.75...18
    Ben.....Lesson 11...14-Nov... 3.75...18
    Ben.....Lesson 9.....10-Oct....3.75...30
    Ben.....Lesson 10...31-Oct....3.75...31

    For "Arun", a basic SUM function would return 115, but I need a formula that would return a value of 79, because Lessons 5 8 & 11 occured on the same day and only impacted 18 people (i.e., not 54)
    Attached Files Attached Files
    Last edited by StephenAF; 12-16-2011 at 12:40 PM.

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Need to SUM units based on multiple criteria while ignoring duplicate dates

    Couldn't you accomplish it with a pivot table?
    Going for Guru! Click the Star to the bottom left of this post if I helped!

  3. #3
    Registered User
    Join Date
    11-03-2011
    Location
    Seattle, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Need to SUM units based on multiple criteria while ignoring duplicate dates

    I've tried that, but the way I'm already using the pivot table just totals the numberws per presenter as a whole. So the numbers are much hire than they really are. I need this formula so that I can have the correct info in the source data for the pivot table.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Need to SUM units based on multiple criteria while ignoring duplicate dates

    Hi StephenAF,

    See the attached file and let me know if this works for you

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  5. #5
    Registered User
    Join Date
    11-03-2011
    Location
    Seattle, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Need to SUM units based on multiple criteria while ignoring duplicate dates

    Hi DILIPandey,

    The results were exactly what I needed, but I need them to show in one cell that is apart of the source code. This dummy sheet represents a piece of a much larger sheet that acts as the source code for another pivot table.

    The ideal state is a formula that can calculate the #'s to the total on your sheet, but not in a pivot table format.

    Cheers,
    StephenAF

  6. #6
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Need to SUM units based on multiple criteria while ignoring duplicate dates

    This formula will give the Arun's Total # of people impacted (EXCLUDING duplicate dates)

    =SUM(IF(SIGN(FREQUENCY(IF(Table4[Presenter]="Arun",Table4[Date]),Table4[Date])),Table4['# of people impacted]))

    Confirmed with CTRL+SHIFT+ENTER
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  7. #7
    Registered User
    Join Date
    11-03-2011
    Location
    Seattle, Washington
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Need to SUM units based on multiple criteria while ignoring duplicate dates

    Haseeb,

    That's amazing! Thank you. That works perfectly. Surprisingly I'm already using a code VERY similar to this in this workbook, but I couldn't seem to adjust it for this purpose.

    Thank you very much everyone for your help.

  8. #8
    Registered User
    Join Date
    03-17-2016
    Location
    India
    MS-Off Ver
    2010
    Posts
    83

    Re: Need to SUM units based on multiple criteria while ignoring duplicate dates

    Hi Stephen,

    I just came up with the another way to solve your thread, i used a simple logic which make easy to get sum

    Please have a look attached file

    Step1: Sort fields - firstly Presenter then Date - From (Data - Sort)
    Step2: Column F- In F3 = IF([@Date]=C2,0,[@['# of people impacted]])
    Step4: Do pivot with sum field column F
    Or In G Column - We can use Sum if function

    Thanks.....
    Attached Files Attached Files
    Thank You.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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