# Bingo card

#### jooquase

##### New Member
Hi all, I was wondering if there was a way to have a series of Different Random results.
For example if I want to randomly generate a bingo card, I am able to Randomly fill the card, but I canot find a way to prevent duplicates in my colums ...
Does any one know of any way to do this ?

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

#### ChrisUK

##### Well-known Member
Hi and welcome to the board!

One way of doing this would be to add your generated numbers into an array and for each number scan down the array, if it already exists generate it again, if not add it and move to the next.

HTH

Chris

#### xapie128

##### Board Regular
Try:
Code:
``````Dim n(15) As Integer

Sub BingoCard()

Randomize (Timer)

[A1:E6].Clear
[A1:E6].Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With

[A1] = "B"
[B1] = "I"
[C1] = "N"
[D1] = "G"
[E1] = "O"

[A2].Select

For w = 0 To 4

For x = 1 To 15
n(x) = 0
Next

For y = 1 To 5
TryAgain:
z = Int(15 * Rnd + 1)
If n(z) <> 0 Then GoTo TryAgain
n(z) = z
ActiveCell.Offset(y - 1, w) = (w * 15) + z
Next
Next

End Sub``````

Replies
1
Views
665
Replies
0
Views
172
Replies
1
Views
517
Replies
3
Views
318
Replies
11
Views
2K

1,171,178
Messages
5,874,185
Members
433,033
Latest member
thatmacroguy

### 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.

### Which adblocker are you using?

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

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