Hi,
I have two columns of data, Col A and Col B. I want to randomly pair them exclusively so I can subtract A from B. But I only want to pair values where A is less than B. Any ideas?
I can get as far as randomly pairing exclusively, though making sure A is less than B I can't figure out. So far, I assign a rand() value to all A values, then I rank those values in another column. I do the same for Col B. Then I just pair those w/ identical rank values.
I was toying w/ multiplying the rand() value by the actual value in Col A and likewise for B, and then ranking them, or perhaps using randbetween(0,givenvalue) but of course these ideas aren't complete and probably bias the results to not being random.
Note that I do need the pairings to be exclusive (1 Col A value per 1 Col B value).
I'm also clueless w/ VBA, though I'm willing to give it a shot if it's the only way.
Thanks,
kbrownk
Excel 2007
I have two columns of data, Col A and Col B. I want to randomly pair them exclusively so I can subtract A from B. But I only want to pair values where A is less than B. Any ideas?
I can get as far as randomly pairing exclusively, though making sure A is less than B I can't figure out. So far, I assign a rand() value to all A values, then I rank those values in another column. I do the same for Col B. Then I just pair those w/ identical rank values.
I was toying w/ multiplying the rand() value by the actual value in Col A and likewise for B, and then ranking them, or perhaps using randbetween(0,givenvalue) but of course these ideas aren't complete and probably bias the results to not being random.
Note that I do need the pairings to be exclusive (1 Col A value per 1 Col B value).
I'm also clueless w/ VBA, though I'm willing to give it a shot if it's the only way.
Thanks,
kbrownk
Excel 2007