+ Reply to Thread
Results 1 to 2 of 2

Count records dependent on 2 variables

Hybrid View

  1. #1
    Registered User
    Join Date
    02-11-2007
    Posts
    19

    Count records dependent on 2 variables

    Is there an easy way to get counts of unique dates when my data set looks something like below? I will always know the days that need counted because it's by month (for instance 31 days in March: 3/1/08-3/31/08) and the Code list is constant (I've shown just 3 codes below to create a small simulation).

    Sample:
    Column A.....Column B
    Date...........Code
    03/04/2008..1
    03/04/2008..1
    03/07/2008..1
    03/07/2008..1
    03/07/2008..1
    03/07/2008..1
    03/21/2008..1
    03/22/2008..1
    03/25/2008..1
    03/04/2008..2
    03/06/2008..2
    03/06/2008..2
    03/31/2008..2
    03/04/2008..3
    03/22/2008..3
    03/24/2008..3
    03/31/2008..3
    and so on

    So what I need summarized for me is the # of unique days per code:
    Code....Unique Days
    1.........5
    2.........3
    3.........4

    I don't think a Pivot table can accomplish this, or can it? I would think this would be easy, but I'm drawing a complete blank and have no ideas so any help would be greatly appreciated.

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Indirect ways(more than 1 step:

    1- Go for the pivot option. Both code and date in the row section and the "count of date" in the data section.

    2- You could also try sumproduct formulas to get the values for each code by day. and take it from there.

    Direct (maybe)
    using a sumproduct/frequency statement
    Last edited by Portuga; 04-10-2008 at 02:13 AM.
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

+ 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