+ Reply to Thread
Results 1 to 2 of 2

Sum of unique values with mulitple criteria based on date :/

  1. #1
    Registered User
    Join Date
    08-04-2016
    Location
    Newcastle, England
    MS-Off Ver
    365
    Posts
    7

    Sum of unique values with mulitple criteria based on date :/

    Hi,

    I have the following data and am completely stuck at working something out:

    ID First Seen Class Date Class Exercise Type
    1234 01/04/2016 01/04/2016 a Cardio
    1234 01/04/2016 02/05/2016 b Weights
    1325 25/05/2016 05/06/2016 b Weights
    1658 01/08/2016 07/09/2016 c Weights
    4587 08/06/2016 08/06/2016 b Cardio
    4587 08/06/2016 01/07/2016 c Weights
    4587 08/06/2016 29/07/2016 a Weights
    1234 08/06/2016 29/07/2016 b Weights


    So... I am trying to find, for each "Class Type" the number of customers who took Class A first, Class B first and Class C first - AND the number who took Class A second, Class B second and Class C second; the results would be displayed similar to this:


    . CARDIO CARDIO CARDIO WEIGHTS WEIGHTS WEIGHTS
    . A B C A B C
    1st Class Taken 1 1 0 0 1 1
    2nd Class Taken 0 1 1 0 0 0


    Any help would be massively appreciated on a formula - I'm well and truly beat

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sum of unique values with mulitple criteria based on date :/

    andylee1892 I don't see how you are coming up with the numbers you expect. Please see the attached.

    In order to keep track of which was the first class for each ID/Class/Type I sorted the table by Class Date.

    I then had to use 2 helper columns.

    The first helper column F is a cumulative count of ID/Class/Type. The formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The second helper column G is a cumulative count of ID ... ie 1st, 2nd 3rd time and therefore 1st, 2nd 3rd class taken. (Dates are sorted.)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then the formula that does the final counts:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The counts seem to check out. Does this do what you want?
    Dave

+ 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. List Unique Values Based On Criteria
    By tangmere.milli in forum Excel General
    Replies: 5
    Last Post: 03-16-2015, 09:49 AM
  2. [SOLVED] Count Unique Values Based on Earliest Date Criteria
    By Aquamore in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-04-2014, 09:12 PM
  3. [SOLVED] Unique Values Formula Based on Criteria
    By zmster2033 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-07-2014, 10:03 PM
  4. Unique values between dates based on criteria
    By Philipdjhd in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-21-2014, 01:58 AM
  5. [SOLVED] Sum Unique Values Based on Other Column Criteria
    By jfist85 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-06-2013, 03:21 PM
  6. Countifs unique values based on two criteria
    By shaz0503 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-06-2012, 08:48 PM
  7. Count unique values based on several criteria
    By evilgrin in forum Excel General
    Replies: 2
    Last Post: 10-10-2010, 03:50 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