All possible combinations of three columns

baldwinp

New Member
Joined
Sep 26, 2014
Messages
8
Hi, I need a macro or formula that will make a list of all the possible combinations from three different columns. Example below, but obviously I would want the list to continue for all the combinations. Thank you in advance!


</SPAN>
[TABLE="width: 336"]
<TBODY>[TR]
[TD="class: xl35128, width: 64, bgcolor: transparent"]Letters
[/TD]
[TD="class: xl35128, width: 64, bgcolor: transparent"]Name
[/TD]
[TD="class: xl35128, width: 64, bgcolor: transparent"]Number
[/TD]
[TD="class: xl35128, width: 64, bgcolor: transparent"][/TD]
[TD="class: xl35128, width: 64, bgcolor: transparent"]Letters
[/TD]
[TD="class: xl35128, width: 64, bgcolor: transparent"]Name
[/TD]
[TD="class: xl35128, width: 64, bgcolor: transparent"]Number
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]John
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]John
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"]B
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Pat
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]2
[/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Pat
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"]C
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tom
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]3
[/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tom
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"]D
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tim
[/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tim
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"]E
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Steve
[/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Steve
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"]F
[/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]John
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]2
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Pat
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]2
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tom
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]2
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tim
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]2
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Steve
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]2
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]John
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]3
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Pat
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]3
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tom
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]3
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tim
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]3
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]A
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Steve
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]3
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]B
[/TD]
[TD="class: xl35128, bgcolor: transparent"]John
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]B
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Pat
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]B
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tom
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]B
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Tim
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"][/TD]
[TD="class: xl35128, bgcolor: transparent"]B
[/TD]
[TD="class: xl35128, bgcolor: transparent"]Steve
[/TD]
[TD="class: xl35128, bgcolor: transparent, align: right"]1
[/TD]
[/TR]
</TBODY>[/TABLE]
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
May not be the best method, but it works.

Code:
Sub do_it()

wr = 2

Range("E2:G65356").ClearContents

For a = 2 To Range("A65536").End(xlUp).Row
For b = 2 To Range("B65536").End(xlUp).Row
For c = 2 To Range("C65536").End(xlUp).Row

Cells(wr, "E") = Cells(a, "A").Value
Cells(wr, "F") = Cells(b, "B").Value 'Name
Cells(wr, "G") = Cells(c, "C").Value 'Number

wr = wr + 1

Next c
Next b
Next a

End Sub

hth,
Ross
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top