Consulting

Results 1 to 2 of 2

Thread: Group/Count Combinations in Access Table based on Two Feilds

  1. #1
    VBAX Newbie
    Joined
    Jun 2013
    Posts
    2
    Location

    Group/Count Combinations in Access Table based on Two Feilds


    I have two columns in an Access table that I would like to group distinctcombinations for.

    Field 1 Field 2 345 TV 345 Press 345 Cinema 347 TV 400 Facebook 457 Cinema 644 TV 644 Radio 899 Facebook 999 TV
    So for example below I would like to count field2 by the number of unique instances in column one. For example I would like to know how many instances are there of just TV in relation to field1 which equals 2 (Only 347 and 999 have TV only). Similarly instances of Facebook equal two. Instances of TV and Radio equals 1 (644)

    So the final results would be something like this:

    Combination Count TV Only 2 Cinema Only 1 Facebook Only 2 TV, Press & Cinema 1 TV and Radio 1

    Is there an easy way to do this in Access either using the front end/queries or through using VBA or SQL?

    Hope someone can help.

    Thanks,

    Greedy


  2. #2
    VBAX Newbie
    Joined
    Jun 2013
    Posts
    2
    Location
    I've attached the example in an excel spreadsheet so that it is clearer to see. The actual data sits in Access and consists of 1.9 million rows.

    Thanks,

    Greedy
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •