+ Reply to Thread
Results 1 to 7 of 7

calculate the difference between each possible pair of data

  1. #1
    Registered User
    Join Date
    08-11-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    4

    calculate the difference between each possible pair of data

    Hey everyone,

    So basically what i am trying to do is as follows: I have around 26 lists of data, call them A to Z. What I want to do is write a code that will calculate the difference between each possible pair of data, and if possible plot it as a matrix. E.g. if A has data: 3, 9, 24 and B has data: 1,5,13, when running my macro i will get a list: 1,4, 11. Then i want to do this for A vs C, A vs D, C vs D etc etc.

    Obviously doing it manually would take a very long time, If you could tell me what kind of thing could work or any references it would be much appreciated. Thank you!
    Last edited by JBeaucaire; 08-12-2012 at 06:44 PM. Reason: Corrected thread title to topic only, as per forum rules

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Have no idea if this is even possible!!

    Can you provide a sample of what you want?

  3. #3
    Registered User
    Join Date
    08-11-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Have no idea if this is even possible!!

    A B C D E
    13 1 5 12 15
    11 4 8 9 3
    24 11 14 17 22

    So this is my list of data (I actually have another 20 columns worth), then I want a macro which when run will produce a table like below:

    A VS B A VS C A VS D B VS C
    11 8 1 -4
    7 3 2 -4
    13 10 7 -3

  4. #4
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Have no idea if this is even possible!!

    Vs means minus right? The first minus the second?

  5. #5
    Registered User
    Join Date
    08-11-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Have no idea if this is even possible!!

    Yes that is correct, sorry should have made that clear.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: Have no idea if this is even possible!!

    See if this is what you wanted
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Have no idea if this is even possible!!

    maybe you should have a read of the forum rules and change your thread title to describe the problem.
    Like a post? Click the star below it!

+ 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