Combin copy total 924 sets

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Hello @DanteAmor, could you please take a look my request under the following link.
---Where I did request in my opening post “I want to make copies of 13 rows of 2 lines sets using =COMBIN(13,2) = means total 78 combinations like copy line1&2, 1&3, 1&4, 1&5, 1&6 so on up to 78 combinations.)---
VBA Code:
Sub combin_13_2()
  Dim a As Variant, b As Variant
  Dim i As Long, j As Long, k As Long, m As Long, n As Long
 
  a = Range("A6:AX18").Value
  n = WorksheetFunction.Combin(13, 2) * 3
  ReDim b(1 To n, 1 To UBound(a, 2))
 
  For i = 1 To UBound(a, 1)
    For j = i + 1 To UBound(a, 1)
      m = m + 1
      For k = 1 To UBound(a, 2)
        b(m, k) = a(i, k)
        b(m + 1, k) = a(j, k)
      Next
      m = m + 2
    Next
  Next
 
  Range("A25").Resize(UBound(b, 1), UBound(b, 2)).Value = b
End Sub

But now I want to make copies of 12 rows of 6 lines sets using =COMBIN(12,6) = means total 924 combinations like copy line1&2&3&4&5&6, 1&2&3&4&5&7, 1&2&3&4&5&8 and so on up to 924 combinations. Please can you modify the code so it can work with the current layout?

Kishan Index.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1
2
3
4Serial NumbersEM12345678910111213141516171819202122232425
5Serial NumbersEM12345678910111213141516171819202122232425
61N.X1N.XN.X1N.XN.XN.XN.X1N.XN.XN.XN.XN.XN.XN.XN.XN.X123456
72N.XN.XN.XN.X12N.XN.XN.XN.XN.XN.XN.XN.X1N.X1N.XN.X123456
83N.XN.XN.XN.X123N.XN.XN.XN.X1N.XN.X123N.X1234567
94N.XN.XN.XN.XN.X12N.X1N.XN.X123456N.X1234567
105N.XN.XN.XN.X1N.X1N.X1N.XN.XN.X1234N.XN.XN.X123456
1161N.XN.X12N.X1N.XN.XN.X123N.X1N.XN.XN.XN.X123456
1271N.XN.X1N.XN.XN.X1N.XN.X12N.XN.X1N.XN.X1N.X123456
1381N.XN.XN.XN.XN.XN.X1N.X1N.X1N.XN.XN.XN.XN.X12345678
149N.X1N.XN.X1N.XN.XN.XN.X123N.X1N.XN.XN.X12345678
151012N.X12N.XN.XN.XN.X12N.XN.X123N.X1N.X123456
161112N.X123N.XN.XN.XN.XN.XN.X1N.X123N.XN.X123456
171212N.XN.X12N.X1N.XN.X123N.X123N.X1234567
18
19
20
21
22
23
24Serial NumbersEM12345678910111213141516171819202122232425
251N.X1N.XN.X1N.XN.XN.XN.X1N.XN.XN.XN.XN.XN.XN.XN.XN.X123456
262N.XN.XN.XN.X12N.XN.XN.XN.XN.XN.XN.XN.X1N.X1N.XN.X123456
273N.XN.XN.XN.X123N.XN.XN.XN.X1N.XN.X123N.X1234567
284N.XN.XN.XN.XN.X12N.X1N.XN.X123456N.X1234567
295N.XN.XN.XN.X1N.X1N.X1N.XN.XN.X1234N.XN.XN.X123456
3061N.XN.X12N.X1N.XN.XN.X123N.X1N.XN.XN.XN.X123456
31
321N.X1N.XN.X1N.XN.XN.XN.X1N.XN.XN.XN.XN.XN.XN.XN.XN.X123456
332N.XN.XN.XN.X12N.XN.XN.XN.XN.XN.XN.XN.X1N.X1N.XN.X123456
343N.XN.XN.XN.X123N.XN.XN.XN.X1N.XN.X123N.X1234567
354N.XN.XN.XN.XN.X12N.X1N.XN.X123456N.X1234567
365N.XN.XN.XN.X1N.X1N.X1N.XN.XN.X1234N.XN.XN.X123456
3771N.XN.X1N.XN.XN.X1N.XN.X12N.XN.X1N.XN.X1N.X123456
38
391N.X1N.XN.X1N.XN.XN.XN.X1N.XN.XN.XN.XN.XN.XN.XN.XN.X123456
402N.XN.XN.XN.X12N.XN.XN.XN.XN.XN.XN.XN.X1N.X1N.XN.X123456
413N.XN.XN.XN.X123N.XN.XN.XN.X1N.XN.X123N.X1234567
424N.XN.XN.XN.XN.X12N.X1N.XN.X123456N.X1234567
435N.XN.XN.XN.X1N.X1N.X1N.XN.XN.X1234N.XN.XN.X123456
4481N.XN.XN.XN.XN.XN.X1N.X1N.X1N.XN.XN.XN.XN.X12345678
Hoja1


Regards,
Kishan
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Why have you asked that only one specific person answers this?
 
Upvote 0
Why have you asked that only one specific person answers this?
Hello GlennUK, it is just because he solved me the similar query this was just a modification of the same. I am sorry if I have hurt anyone.

Have a nice day.

Kind Regards,
Kishan
 
Upvote 0
Hi Kisha, it's not about hurting anyone, other than yourself. People are less likely to help if they assume that you already have someone helping you is all. I assume you'd rather have anybody help on this?
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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