Create Part Numbers based on row/column content

maykinit

New Member
Joined
Jan 19, 2009
Messages
31
ApprovalInsetRTDClassSensingElementElectricalCircuit
161AAA
3TBBB
BCDC
EDD
E
F

I am looking for a solution to create all possible part numbers based on the content of a number of columns.
IE:
161AAA
161BAA
161CAA
161DAA
....or in whatever order that works in capturing all possible combinations. Any help would be incredibly appreciated. There is a time line I am facing down that is growing ever so close.

Thanks so much,
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
this will write all the part numbers to column "H"

VBA Code:
Sub Part_no()

wr = 1

For a = 2 To Range("A" & Rows.Count).End(xlUp).Row
For b = 2 To Range("B" & Rows.Count).End(xlUp).Row
For c = 2 To Range("C" & Rows.Count).End(xlUp).Row
For d = 2 To Range("D" & Rows.Count).End(xlUp).Row
For e = 2 To Range("E" & Rows.Count).End(xlUp).Row
For f = 2 To Range("F" & Rows.Count).End(xlUp).Row

Cells(wr, "H") = Cells(a, "A") & Cells(b, "B") & Cells(c, "C") & Cells(d, "D") & Cells(e, "E") & Cells(f, "F")
wr = wr + 1

Next f
Next e
Next d
Next c
Next b
Next a


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,174
Members
448,870
Latest member
max_pedreira

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