GRID 3x3, row, column, total must be 14

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,422
Office Version
  1. 2010
Hello,

Is it possible to create all possible Grids 3x3 which rows and column total must be 14 using all numbers are in column B, C, D

Apart of creating all possible Grids could be having random option too.

Example below showing 4 examples not necessary show the total of rows and columns it is shown just for example


Book1
ABCDEFGHIJ
1Choice 1Choice 2Choice 3
2059
3068
4077
508605914
609564414
714985114
8158141414
9167
1017665314
1118533814
1219456314
13239141414
14248
1525792314
1626635614
1727527514
18284141414
19293
2032957214
2133834714
2234763514
23356141414
24365
25374
26383
27392
28419
29428
30437
31446
32455
33464
34473
35482
36491
37509
38518
39527
40536
41545
42554
43563
44572
45581
46590
47608
48617
49626
50635
51644
52653
53662
54671
55680
56707
57716
58725
59734
60743
61752
62761
63770
64806
65815
66824
67833
68842
69851
70860
71905
72914
73923
74932
75941
76950
77
78
79
80
81
Sheet2


Thank you all
Excel 2000
Regards,
Moti
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
This may be a starting point:-
NB:- Matrix based on column "A" data"
https://app.box.com/s/3c4kia2hs7w8fmbda19wpn2va17laujo
Thank you MickG, for giving a code solution.

I saved workbook as workbook 97-2003 as I am using version 2000
Clicking on update button highlight following line is shown in red, gives error 438

Code:
 Dim K As Variant, Pk As Long, c As Long, Num As Long, temp As Long, Rw As Long
  Dim Myray As Variant
   temp = -1
   For Rw = 1 To UBound(nRay, 1)
    [COLOR=#ff0000][B]Num = Application.RandBetween(0, .Count - 1)[/B][/COLOR]

Kind Regards,
Moti
 
Upvote 0
If your idea was to use up all the numbers in your data to make up Magic squares, then I can see a problem with matching/using all the numbers to make individual 3x3 squares. That's a bit too difficult!!
You could use most of them, but there is bound to be a number left over.
 
Upvote 0
If your idea was to use up all the numbers in your data to make up Magic squares, then I can see a problem with matching/using all the numbers to make individual 3x3 squares. That's a bit too difficult!!
You could use most of them, but there is bound to be a number left over.
Hello Mick, I think it's possible some number left over, and it's difficult too get all magic esquires also.

I was just trying to find how much could be all matches, but I am not sure, for example looking in to column B "0 to 9" there are total 75, as shown in F4:G13, so I imagine could be total magic esquire 330 as shown in Q4:Q13 with each digit "0 to 9", may I am wrong.

Here are the example calculations


Book1
ABCDEFGHIJKLMNOPQR
1Choice 1Choice 2Choice 3Total
205975330
3068WithMatch
407705432115
5086165432121
60952765432128
714938765432136
8158498765432145
916751098765432155
10176698765432145
1118578765432136
121948765432128
13239965432121
14248
15257
16266
17275
18284
19293
20329
21338
22347
23356
24365
25374
26383
27392
28419
29428
30437
31446
32455
33464
34473
35482
36491
37509
38518
39527
40536
41545
42554
43563
44572
45581
46590
47608
48617
49626
50635
51644
52653
53662
54671
55680
56707
57716
58725
59734
60743
61752
62761
63770
64806
65815
66824
67833
68842
69851
70860
71905
72914
73923
74932
75941
76950
77
78
79
80
81
Sheet2


Kind Regards,
Moti
 
Upvote 0

Forum statistics

Threads
1,224,847
Messages
6,181,318
Members
453,032
Latest member
Pauh

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