Kerry McKenzie: How do I use Microsoft Excel 2007 to generate every different 6 number combination between 1 and 37?
A friend of mine challenged me to learn more about Microsoft Excel, but, I just can’t figure out how to do this. Lol!
Answers and Views:
Answer by The White Guinea Pig
this function doesn’t exist.
cope.
Answer by Wesley MHere’s one method – In cells A1 through F1 enter the numbers 1 through 6. This will represent your first combination.
In cells A2 through F2 enter the following:
A2: =IF(B1=33,1,0)+A1
B2: =IF(C1=34,IF(B1=33,A2,B1)+1,B1)
C2: =IF(D1=35,IF(C1=34,B2,C1)+1,C1)
D2: =IF(E1=36,IF(D1=35,C2,D1)+1,D1)
E2: =IF(F1=37,IF(E1=36,D2,E1)+1,E1)
F2: =IF(F1=37,E2,F1)+1
Now copy and paste all the way down columns A through F. This gives you the first 1,048,576 combinations.
Next, in cells H1:M1, enter the following:
H1: =IF(B1048576=33,1,0)+A1048576
I1: =IF(C1048576=34,IF(B1048576=33,
H1,B1048576)+1,B1048576)
J1: =IF(D1048576=35,IF(C1048576=34,
I1,C1048576)+1,C1048576)
K1: =IF(E1048576=36,IF(D1048576=35,
J1,D1048576)+1,D1048576)
L1: =IF(F1048576=37,IF(E1048576=36,
K1,E1048576)+1,E1048576)
M1: =IF(F1048576=37,L1,F1048576)+1
Now copy the range A2:F2 and paste into cells H2:M2 and then paste all the way down columns H through M.
Next, into cells O2:T2, enter the following:
O1: =IF(I1048576=33,1,0)+H1048576
P1: =IF(J1048576=34,IF(I1048576=33,
O1,I1048576)+1,I1048576)
Q1: =IF(K1048576=35,IF(J1048576=34,
P1,J1048576)+1,J1048576)
R1: =IF(L1048576=36,IF(K1048576=35,
Q1,K1048576)+1,K1048576)
S1: =IF(M1048576=37,IF(L1048576=36,
R1,L1048576)+1,L1048576)
T1: =IF(M1048576=37,S1,M1048576)+1
Now copy the range A2:F2 and paste into cells O2:T2 and then paste all the way down to row 227632.
Leave a Reply