Help me please

bloubul

Member
I have the following macro, it gives combo's numeric, but I want the combo's to be in "RANDOM ORDER".

Will any one please help me.

Option Explicit
Dim A As Integer, B As Integer, C As Integer, D As Integer, E As Integer
Dim n As Long
Sub List_Comb559()
Range("A1").Select
Application.ScreenUpdating = False
n = 0
For A = 1 To 55
For B = A + 1 To 56
For C = B + 1 To 57
For D = C + 1 To 58
For E = D + 1 To 59
n = n + 1
If n = 65001 Then
n = 1
ActiveCell.Offset(-65000, 1).Select
Application.ScreenUpdating = True
Application.ScreenUpdating = False
End If
ActiveCell.Value = A & "-" & B & "-" & C & "-" & D & "-" & E
ActiveCell.Offset(1, 0).Select
Next E
Next D
Next C
Next B
Next A
Application.ScreenUpdating = True
End Sub

I thank You

BlouBul :cool:
 

time*treat

Member
Change TopVal from 12 to 59, or whatever

Option Explicit
Sub Lexico5__Mixer()
'Lexicographic Mixer 0.1'
'by time*treat, Aug 15, 2017'

'Creates all 5-number sets of R (TopVal) numbers.
'The sets are created in order, but the individual numbers are (pseudo) randomized'
'ScreenUpdating optional'

Dim A As Long, B As Long, C As Long, D As Long, E As Long
Dim N As Long, TopVal As Long

Dim In__Array() As Long, Out__Array() As Long
Dim In__Position As Long, Out__Position As Long
Dim Placement__Count As Long

Range("A1").Select
'Application.ScreenUpdating = False
TopVal = 12:
ReDim In__Array(5): N = 0
For A = 1 To TopVal - 4
For B = A + 1 To TopVal - 3
For C = B + 1 To TopVal - 2
For D = C + 1 To TopVal - 1
For E = D + 1 To TopVal
N = N + 1
If N = 65001 Then
N = 1
ActiveCell.Offset(-65000, 1).Select
'Application.ScreenUpdating = True
'Application.ScreenUpdating = False​
End If

In__Array(1) = A
In__Array(2) = B
In__Array(3) = C
In__Array(4) = D
In__Array(5) = E

ReDim Out__Array(5): Placement__Count = 0

While Placement__Count < 5
In__Position = 4 * Rnd() + 1
If In__Array(In__Position) <> 0 Then
Out__Position = 4 * Rnd() + 1

If Out__Array(Out__Position) = 0 Then
Out__Array(Out__Position) = In__Array(In__Position)
In__Array(In__Position) = 0
Placement__Count = Placement__Count + 1​
End If​
End If​
Wend

ActiveCell.Value = _
Out__Array(1) & "-" & Out__Array(2) & "-" & Out__Array(3) & "-" & Out__Array(4) & "-" & Out__Array(5)

ActiveCell.Offset(1, 0).Select​
Next E​
Next D​
Next C​
Next B​
Next A
'Application.ScreenUpdating = True​
End Sub
 

bloubul

Member
time*treat

Help me again please. Our Lotto Matrix has changed from the 1 August 2017 from a 6/49 to a 7/52. Where must I change the above macro so that it gives a 7/52.
Also I have a macro of you called " REPEATSLAYER" but I do not know how to setup the spreadsheet, will you help here also please.

BlouBul :cool:
 

time*treat

Member
Change TopVal, like before. Be careful.

Option Explicit
Sub Lexico7__Mixer()
'Lexicographic Mixer 0.2'
'by time*treat, Aug 26, 2017'

'Creates all 7-number sets of R (TopVal) numbers.
'The sets are created in order, but the individual numbers are (pseudo) randomized'
'ScreenUpdating optional'

'' Warning - If R is too high, you will run out of ''
'' cells long before you run out of combinations. :bomb: ''


Dim A As Long, B As Long, C As Long
Dim D As Long, E As Long
Dim F As Long, G As Long

Dim N As Long, TopVal As Long

Dim In__Array() As Long, Out__Array() As Long
Dim In__Position As Long, Out__Position As Long
Dim Placement__Count As Long, Max__Placements As Long

Range("A1").Select
'Application.ScreenUpdating = False
TopVal = 12: Max__Placements = 7
ReDim In__Array(Max__Placements): N = 0
For A = 1 To TopVal - 6
For B = A + 1 To TopVal - 5
For C = B + 1 To TopVal - 4
For D = C + 1 To TopVal - 3
For E = D + 1 To TopVal - 2
For F = E + 1 To TopVal - 1
For G = F + 1 To TopVal
N = N + 1
If N = 65001 Then
N = 1
ActiveCell.Offset(-65000, 1).Select
'Application.ScreenUpdating = True
'Application.ScreenUpdating = False​
End If

In__Array(1) = A
In__Array(2) = B
In__Array(3) = C
In__Array(4) = D
In__Array(5) = E
In__Array(6) = F
In__Array(7) = G

ReDim Out__Array(Max__Placements): Placement__Count = 0

While Placement__Count < Max__Placements
In__Position = (Max__Placements - 1) * Rnd() + 1
If In__Array(In__Position) <> 0 Then
Out__Position = (Max__Placements - 1) * Rnd() + 1

If Out__Array(Out__Position) = 0 Then
Out__Array(Out__Position) = In__Array(In__Position)
In__Array(In__Position) = 0
Placement__Count = Placement__Count + 1​
End If​
End If​
Wend

ActiveCell.Value = _
Out__Array(1) & "-" & Out__Array(2) & "-" & Out__Array(3) _
& "-" & Out__Array(4) & "-" & Out__Array(5) _
& "-" & Out__Array(6) & "-" & Out__Array(7)
ActiveCell.Offset(1, 0).Select​

Next G
Next F
Next E
Next D
Next C
Next B​
Next A
'Application.ScreenUpdating = True​
End Sub
 

bloubul

Member
Hi All.

It’s just me again and I need some help.
I’m looking for a macro to find “DUPLICATING ROWS”, in excel. My data starts in Column A1:G8000, somewhere in my databases I have duplicating “ROWS” and I must get rid of those rows.

Any One Please

BlouBul :cool:
 

time*treat

Member
Hi All.

It’s just me again and I need some help.
I’m looking for a macro to find “DUPLICATING ROWS”, in excel. My data starts in Column A1:G8000, somewhere in my databases I have duplicating “ROWS” and I must get rid of those rows.

Any One Please

BlouBul :cool:


For eliminating EXACT sets, I'm thinking a modified RepeatSlayer will get it done
If you upload a sample/copy of the database (saved in CSV or xl '03 format), it'll be easier to see what needs to be changed.
 

bloubul

Member
time*treat

Here is the link. https://www.mediafire.com/file/x0i0z777id15pu7/Lunch_Time.csv.

Thanks for your help.

BlouBul :cool:
 

time*treat

Member
Your original data didn't contain any Match 7s but did have some match 6s.

For the "full run", change SizeToMark = 6 to SizeToMark = 7
and FullRowErase__Flag = False to FullRowErase__Flag = True


http://www.mediafire.com/file/3ra9nb48pkfxa6a/Lunch_Time_modified.xls

http://www.mediafire.com/file/thpot1bvtb08l0i/RepeatMarker.html

 

bloubul

Member
Hi all

I'm looking for a macro to copy all "ZERO" numbers into the next columm.
My sheet starts in colomn "A2" with numbers 1 - 49, which is the main column.
In columns "B2:H50", is the count of each number.

What I'm looking for is a macro to take column "B2:B50", and compare
it with column "A2:A50", and than copy all numbers in column "A2:A50",
which shows a "ZERO", in column "B2:B50", and copy it to column "J2:J50",
than take column "C2:C50", compare it with column "A2:A50, than copy all
numbers in column "A2:A50", to column "K2:K50", which displays "ZERO" in column
"C2:C50",etc etc. I know I can use the "FILTER MODE", but this is only part
of a bigger sheet, and the "FILTER MODE" is very time consuming.

I trust my explanation is understandable.

Here is the link: https://www.mediafire.com/file/5me837omdb17j7b/Zero_Count.xlsx

BlouBul :cool:
 

Frank

Member
Unless I'm missing something, its dead easy, you dont need a macro. Type this formula into cell J2.

=IF(B2=0,$A2,"")

Then just copy this formula across to column P, and also copy the whole row of formulas J2:p2 down to row 50.

Job done !

(column Q has no corresponding reference column I )
:)

you could replace the "" with a zero but I suspect you are not doing arithmetic with ball numbers, so it looks better with blank cells where they are non zero in columns B to H.
 

bloubul

Member
time*treat

A while back you wrote me a macro to find all duplicate rows "REPEATMARKER", as I said before it works great. Can you write me a macro to copy all those duplicate rows to sheet 2, and also tell me how many draws between each duplicate row please.

BlouBul :cool:
 

time*treat

Member
time*treat

A while back you wrote me a macro to find all duplicate rows "REPEATMARKER", as I said before it works great. Can you write me a macro to copy all those duplicate rows to sheet 2, and also tell me how many draws between each duplicate row please.

BlouBul :cool:

If you can make a dummy version showing how you want the output to look, save it as an '03 (.xls) format.
Give me a couple days, after that.
 

bloubul

Member
time*treat

Here is the dummy version to show what I want it to show, please.

https://www.mediafire.com/file/etmyjssiecquddc/Lunch_Time_modified.xls/file

BlouBul :cool:
 

time*treat

Member
One of your output cols is labeled 'BB', with red numbers.
Is this a 6+1 game (if so, how should bonus numbers be handled?) or can I ignore this?
 

time*treat

Member
Run the Repeat__Marker7 sub.
This version only marks the summary page, leaving the original results page unmarked.


http://www.mediafire.com/file/sin2j7nbwhln7gr/RepeatMarker7__Oct2218.xls/file
 

Sidebar

Top