+ Reply to Thread
Results 1 to 4 of 4

Columns with the most similar data

  1. #1
    Registered User
    Join Date
    11-09-2008
    Location
    Chicago
    Posts
    2

    Columns with the most similar data

    This is my first time using Excel for much besides sorting data, and I figure this has got to be possible, but I have no idea how.

    I have a data set that looks something like this:
    a| b | c | d
    33 | 102 | 1 | 1
    34 | - | 2 | 2
    119 | - | 33 | 6
    - | - | 119 | 33
    - | - | - | 119
    Where the column header represents a word, and the numbers represent the cities where the word is found. The number of cities connected to a word varies from 1 to 50+. There's about a thousand words.

    I'm trying to find which words share the greatest number of cities - that is, the columns with the most cells in common. Ideally, I'd like to calculate this at different thresholds (columns with 2+ cells in common, 3+, etc.)

    It'd also be cool to do additional queries, like "for columns that share cell X, what other cells do they share?" But that might be too much to ask for...

    Any help would be wonderful!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Don't know if this will help or not but here goes.

    Create a new sheet in the workbook called sheet2. Put the code
    Please Login or Register  to view this content.
    into a general module, select your data sheet and run.

    This will build you a matrix of the words and citites, and provide counts for the cities for a word, and the number of words for a city.

    HTH

    rylo

  3. #3
    Registered User
    Join Date
    11-09-2008
    Location
    Chicago
    Posts
    2
    Hi Rylo,

    Thanks a ton for your help! I made the module and tried running it (Tools > Macros > (select aaa) > Run) and I get Comple error: user-defined type not defined, and it highlights Sub aaa() in the code. Am I running it wrong? (I've never used macros before.)

    Thanks again!

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    This was running OK for me.

    rylo
    Attached Files Attached Files

+ 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