In need of help

Renaye

New Member
Joined
Dec 10, 2016
Messages
9
Hi

I want to make new lotto combinations from one line say

35 30
17
43
34
45
15
1423

<tbody>
</tbody>

Knowing that the smallest number is one and the largest is 45, I wish to +1 to each of the above and continue.

Should look something like this

36311844351161524
37321945362171625
3833201373181726
3934212384191827
4035223395201928
4136234406212029
4237245417222130
4338256428232231
4439267439242332
45402784410252433
1412894511262534
2422910112272635
3433011213282736
4443112314292837
5453213415302938
613314516313039
723415617323140
833516718333241
943617819343342
1053718920353443
11638191021363544
12739201122373645
1384021122338371
1494122132439382
15104223142540393
16114324152641404
17124425162742415
18134526172843426
1914127182944437
2015228193045448
211632920311459
221743021322110
231853122333211
241963223344312
252073324355413
262183425366514
272293526377615
2823103627388716
2924113728399817
30251238294010918

<colgroup><col width="56" span="9" style="width:42pt"> </colgroup><tbody>
</tbody>

But instead it looks like this

363118443546161524
373219453647171625
383320463748181726
393421473849191827
403522483950201928
413623494051212029
423724504152222130
433825514253232231
443926524354242332
454027534455252433
464128544556262534
474229554657272635
484330564758282736
494431574859292837
504532584960302938
514633595061313039
524734605162323140
534835615263333241
544936625364343342
555037635465353443
565138645566363544
575239655667373645
585340665768383746
595441675869393847
605542685970403948
615643696071414049
625744706172424150
635845716273434251
645946726374444352
656047736475454453
666148746576464554
676249756677474655
686350766778484756
696451776879494857
706552786980504958
716653797081515059
726754807182525160
736855817283535261
746956827384545362
757057837485555463


<colgroup><col width="56" span="9" style="width:42pt"> </colgroup><tbody>
</tbody>
Is there a way that I can do this and say when the number hits 46 it changes to 1 again and continues to cycle through until I have enough combinations ?

I am extremely new at excel, I'm a excel virgin so I would appreciate if there was a formula that I could cut and paste into the excel formula bar.

Thanking you for your time, patients and understanding
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Thank you so much it works great. Is it possible to do this with negative and say when it hits zero it goes to 1 ?

=IF(A1=1,45,A1-1) <- would this work ?

 
Upvote 0
If you want zero, use this instead (I learnt this myself today):

=MOD(A1+1,45)
 
Upvote 0
Again this works great but I don't really need the zero. At the moment it is going

42
43
44
45
0
1
2
3

<colgroup><col width="56" style="width:42pt"> </colgroup><tbody>
</tbody>

where I need it as

42
43
44
45
1
2
3
4
5


<colgroup><col width="56" style="width:42pt"> </colgroup><tbody>
</tbody>
Also with the original question, I have found that once it goes over 250 combinations it starts to go a rye, meaning instead of going to 1 it will go to 47 or so.
 
Upvote 0
Try these formulas:

For adding a 1: =A1+1-(A1=45)*45
For subtracting a 1: =A1-1+(A1=1)*45
 
Upvote 0
You are doing something wrong! My original formula does what you want:

=IF(A1=45,1,A1+1)

Also with the original question, I have found that once it goes over 250 combinations it starts to go a rye, meaning instead of going to 1 it will go to 47 or so.

It will not go awry if you just copy it down.
 
Last edited:
Upvote 0

Excel 2016 (Windows) 32 bit
ABCDEFGHI
1353017433445151423
236311844351161524
337321945362171625
43833201373181726
53934212384191827
64035223395201928
74136234406212029
84237245417222130
94338256428232231
104439267439242332
1145402784410252433
121412894511262534
132422910112272635
143433011213282736
154443112314292837
165453213415302938
17613314516313039
18723415617323140
19833516718333241
20943617819343342
211053718920353443
2211638191021363544
2312739201122373645
241384021122338371
251494122132439382
2615104223142540393
Sheet2
Cell Formulas
RangeFormula
A2=IF(A1=45,1,A1+1)
B2=IF(B1=45,1,B1+1)
C2=IF(C1=45,1,C1+1)
D2=IF(D1=45,1,D1+1)
E2=IF(E1=45,1,E1+1)
F2=IF(F1=45,1,F1+1)
G2=IF(G1=45,1,G1+1)
H2=IF(H1=45,1,H1+1)
I2=IF(I1=45,1,I1+1)
 
Upvote 0
Hi AliGW

It was my fault, I opened up a new excel spreadsheet and just tried it again and it is working perfectly. Thank you
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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