+ Reply to Thread
Results 1 to 5 of 5

VBA Needed for all possible two-pair combination of cells

  1. #1
    Registered User
    Join Date
    10-28-2012
    Location
    trenton
    MS-Off Ver
    Excel 2011
    Posts
    3

    VBA Needed for all possible two-pair combination of cells

    I have a large dataset that I need a macro/vba to compute a two-pair combination of all cells into an index in the form (a1-a2)/(a1+a2). I want to take cell a1 and apply the calculation to all cells i.e. a1....an, and then move to cell a2 and so on till all cells are covered.

    I am attaching a sample of my dataset

    Thank you in advance for your help
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: VBA Needed for all possible two-pair combination of cells

    It's not clear, do you need also all values in other columns like (a1-b1)/(a1+b1)

  3. #3
    Registered User
    Join Date
    10-28-2012
    Location
    trenton
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: VBA Needed for all possible two-pair combination of cells

    Each column represent a different sample. I need to loop through one column at a time or I can repeat the process

  4. #4
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: VBA Needed for all possible two-pair combination of cells

    That kind of sounds like homework. :P

    Still, here is my suggestion. Try using a loop that goes through all the cells one by one. Put another loop into it, that goes through all the cells again. Something like this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-28-2012
    Location
    trenton
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: VBA Needed for all possible two-pair combination of cells

    Sounds like that but it is not. I am doing some research and I'm thinking through the data to see what i can do with it.
    Thank you. Will try it

+ 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