Combine and Multiply/Permutate/Mix Words

PipSqueakables

New Member
Joined
Aug 8, 2007
Messages
2
Hi

How do I mix words together like for e.g. this:

1st Column
WordA
WordB
WordC

2nd Column
Word1
Word2

Results:
WordA Word1
WordA Word2

WordB Word1
WordB Word2

WordC Word1
WordC Word2


Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi
Paste the following codes in the macro window ( Alt F11)

Code:
Sub hh()
x = Cells(Rows.Count, 1).End(xlUp).Row
y = Cells(Rows.Count, 2).End(xlUp).Row
For a = 1 To x
For b = 1 To y
Cells(a, b + 2) = Cells(a, 1) & "-" & Cells(b, 2)
Next b
Next a
End Sub
run the macro. It will join all combination of words from col A and col B
Ravi
 
Upvote 0
Hi
List col A vertically and col b horizontally on row1
B2 = =$A2&"-"&B$1
Drag it down and across. you will have all combinations
Ravi
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,254
Members
448,879
Latest member
oksanana

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