Closed Thread
Results 1 to 4 of 4

Counting specific cell pairings

Hybrid View

  1. #1
    Registered User
    Join Date
    10-19-2007
    Posts
    2

    Counting specific cell pairings

    Hi,

    I have a column of data and I am trying to count the number of times a specific combination of pairs occurs within this column.

    E.G.

    My column consists of;

    1
    1
    2
    1
    3

    So I need a function which will move down the column analysing 2 cells at a time and then count the frequency of the pairings. In this case it would be 1-1, 1-2, 2-1, 1-3 etc...

    Any help gratefully received!

    Thanks

    Phil

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if this helps

    Say data starts in A1 enter this in B2 and drag down

    =A1&"-"&A2
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    10-19-2007
    Posts
    2

    Thumbs up Any other ideas!?

    Hi again,

    No joy with that i'm afraid. What I am trying to do is analyse the variables in my dataset for patterns.

    The example dataset I used is;

    1
    1
    2
    1
    3

    As this dataset contains 3 variables (1,2,3) there can be 9 different pairings or combinations: 1,1; 1,2; 1,3; 2,1; 2,2; 2,3; 3,1; 3,2 and 3,3.
    I need Excel to move through this column starting with the first two cells (i.e. 1,1) and step down 1 cell each time and then tell me the number of times a combination occurs.

    Any ideas?

    Thanks,

    Phil

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Closed for cross posting

    Please read forum rules below. Cross posting without the link is not permitted. PM me if you agree to the rules

    VBA Noob

Closed 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