By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,736 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

How to fill a two-column list?

P: n/a
Hi!
I have a list of item and I need to populate two
columns with all of the combinations (not permutations),
omitting the paired elements.

Example:
If my list in column A has W, X, Y, Z. Those are
each some short text string.
I want column B and C to have:
W X
W Y
W Z
X Y
X Z
Y Z
That has all combinations of DIFFERENT list elements
without pairs ( W W would be a pair I don't want.)

OK, I've got a column A filled with my list in an
otherwise clean worksheet. I'm stumped on how to
fill column B and C with the two columns of output
as above. The list is 100 elements long, so doing
it by hand is way too much work if there's a simpler
method. And once the list is set, it won't change
(or changes will be small and can be done by hand),
so formulas in the cells aren't necessary.

I think I just need a VB function that will populate
column B and C based on the content of column A.
But I'm drawing COMPLETE blanks on this; I can't
even see where to start!

Any help would be much appreciated.

Thanks!
Mike
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
OOPS! Sorry, this was meant to go to an Excel
newsgroup. Please ignore it here. :)
Mike
"Broida (spamless)" wrote:

Hi!
I have a list of item and I need to populate two
columns with all of the combinations (not permutations),
omitting the paired elements.

Example:
If my list in column A has W, X, Y, Z. Those are
each some short text string.
I want column B and C to have:
W X
W Y
W Z
X Y
X Z
Y Z
That has all combinations of DIFFERENT list elements
without pairs ( W W would be a pair I don't want.)

OK, I've got a column A filled with my list in an
otherwise clean worksheet. I'm stumped on how to
fill column B and C with the two columns of output
as above. The list is 100 elements long, so doing
it by hand is way too much work if there's a simpler
method. And once the list is set, it won't change
(or changes will be small and can be done by hand),
so formulas in the cells aren't necessary.

I think I just need a VB function that will populate
column B and C based on the content of column A.
But I'm drawing COMPLETE blanks on this; I can't
even see where to start!

Any help would be much appreciated.

Thanks!
Mike

--
Any moron can
write haiku. Just stop at the
seventeenth syllab
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.