Hi All,
I found a video on youtube that draws bingo numbers with no repeats so I simply copied the Macro code by hand, the first part works and creates a random set of numbers the second part however is coming back with an error.
This part works fine:
Sub StartOver()
Cells.Clear
Range("E1") = "Number"
Range("F1") = "Sort"
Range("E2") = 1
Range("E2:E91").DataSeries Step:=1
Range("F2:F91").Formula = "=Rand()"
End Sub
This part doesn't - this button is the bingo number draw button
Sub DrawUnique()
Range("F1").CurrentRegion.Sort Key1:=Range("F1"), Header:=xlYes
Range("E100").End(xlUp).Copy_
Destination:=Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Range("E100").End(xlUp).Resize(1, 2).Clear
End Sub
Destination line is the problem as it is highlighted in Yellow in excel? I am no VBA/Macro expert hence why I just copied it from the video -
https://www.youtube.com/watch?v=QGQ1Hox20VY
I have included the video above - thanks for any help
I found a video on youtube that draws bingo numbers with no repeats so I simply copied the Macro code by hand, the first part works and creates a random set of numbers the second part however is coming back with an error.
This part works fine:
Sub StartOver()
Cells.Clear
Range("E1") = "Number"
Range("F1") = "Sort"
Range("E2") = 1
Range("E2:E91").DataSeries Step:=1
Range("F2:F91").Formula = "=Rand()"
End Sub
This part doesn't - this button is the bingo number draw button
Sub DrawUnique()
Range("F1").CurrentRegion.Sort Key1:=Range("F1"), Header:=xlYes
Range("E100").End(xlUp).Copy_
Destination:=Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Range("E100").End(xlUp).Resize(1, 2).Clear
End Sub
Destination line is the problem as it is highlighted in Yellow in excel? I am no VBA/Macro expert hence why I just copied it from the video -
https://www.youtube.com/watch?v=QGQ1Hox20VY
I have included the video above - thanks for any help