Forum Discussion
Walesm3011
Sep 14, 2020Copper Contributor
Concatenate VBA solution
Digit 1 Digit 2 Digit 3 Digit 4 Digit 5 Digit 6 Digit 7 Digit 8 C 1 1 1 1 0 1 1 C 1 1 2 2 0 2 2 C 1 1 3 3 ...
Bennadeau
Sep 14, 2020Iron Contributor
Hi Walesm3011,
Assuming your table starts at cell A1, the following code will generate the 4212 possible entries in column "J".
Sub concatenate()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
Dim m As Integer
i = 1
For k = 2 To 7
For j = 2 To 14
For l = 2 To 10
For m = 2 To 7
Cells(i, 10) = "c." & "1." & "1." & Cells(j, 4).Value & "." & Cells(k, 5).Value & "." & "0." & Cells(l, 7).Value & "." & Cells(m, 8).Value
i = i + 1
Next m
Next l
Next j
Next k
End Sub
- Walesm3011Sep 14, 2020Copper Contributor
Bennadeau , worked a treat.
Many Thanks
- BennadeauSep 15, 2020Iron Contributor
You're welcome!
- Walesm3011Sep 14, 2020Copper ContributorWorked a treat , thanks