View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] mattisokayatexcel@gmail.com is offline
external usenet poster
 
Posts: 10
Default Combining Text in Columsn


Hi,

I've found variations of what I'm looking for in the group, but
nothing that's an exact fit.

I'm trying to produce a macro that would output all combinations of
words from multiple lists. So, for example, if a sheet contains the
following two lists:

A B
1 happy cow
2 sad dog
3 angry cat

The code would produce the following list in Column C (words separated
by a space).

C
1 happy cow
2 happy dog
3 happy cat
4 sad cow
5 sad dog
6 sad cat
7 angry cow
8 angry dog
9 angry cat

The macro should be able to perform this routine for two, three, or
four columns of words (placing the completed list in the column
immediately to the right of the last list).

Any ideas how to do this?

Thanks!