I am fascinated by board games. They provide immense fun, anyone can enjoy them, they are unpredictable and best of all they are great value for money. That is why whenever I get sometime I experiment with simulating games to know them better [read Why Monopoly board game is not as random as it appears]. So, out of curiosity I have created an excel sheet that can generate bingo / housie (housey) tickets - 24 of them at a time. To get new set of tickets you would hit F9 (recalculate).
Download Bingo / Housie ticket maker excel sheet
Note that these are Bingo UK / India / Australia variant I am talking about, not the US 5*5 type of bingo tickets.
Read on if you want to know how this is done:
According to Wikipedia:
A typical housie/bingo ticket .., contains fifteen numbers, arranged in nine columns by three rows. Each row contains five numbers and four blank spaces. Each column contains either one, two, or very rarely three, numbers:
* The first column contains numbers from 1 to 9,
* The second column numbers from 10 to 19,
* The third 20 to 29 and so on up until the last column, which contains numbers from 80 to 90.
I have removed number “90″ from the list in order to reduce some complexity in generating the tickets.
The problem is now to “generate 15 random number between 1 to 89 and fill them in 15 random spots in a grid of 3 rows by 9 columns such that each row has exactly 5 numbers”
Now I could write a function in VBA to do this, but I wanted to do this only using formulas. So I started breaking the problem.
Once we select any random 5 cells in a 9 cell row, we will fill them with bingo numbers. Now, excel has a function to generate random numbers between 1 to 9 (=round(rand()*9,0)), but this is not good for us since each time we call this function we will get a random number between 1 to 9, where as we need a 5 random numbers without repetition between 1 to 9. The function is memoryless and could repeat numbers when called 5 times.
Instead we can list all the possible “5 cells with numbers and others are empty” combinations of a 9 cells region and select a random combination every time. There are essentially 9C5 i.e. 126 ways in which you can select any 5 cells out of 9 cells (without repetition of course).
So I listed all these combinations in a table and then randomly selected one of the combinations. You can see the first five such combinations in the image below:

Selecting any five cells out of nine cells
Now I created a 3*9 region and filled the cells with 1s or 0s, “1″ when the cell in bingo ticket is supposed to have a value and “0″ if the cell is empty as shown below:

The trick here is that first column in our 3*9 bingo ticket has any number(s) from 1 to 9, second column has any number(s) from 10 to 19 …
Again, the challenge is the numbers should not repeat, otherwise we could simply use rand()*10, rand()*10+10, rand()*10+20 ... to generate the numbers.
This time it gets even more trickier because each column can have either no values, or 1 value or 2 values or 3 values.
The ticket generation logic now looks like:
As you can see, it is easy when the column has no or 1 value in it. But when the column has 2 or 3 I used the combinations trick described earlier.
First I created all 2 number combinations and 3 number combinations. Since the numbers on Bingo ticket are always sorted from top to bottom in a column, I just had to list down 45 combinations (10C2) for 2 numbers and 120 combinations (10C3) for 3 numbers.
The rest of the details are small enough that I can leave them to your imagination. So when the ticket is generated, it looks like this:

Remember to download housie / bingo ticket generator excel sheet and print your tickets at home. Just F9 to generate new set of tickets. Un-hide the rows from 43 if you want to see how this is done.
Like this post: Consider digging it or bookmarking it on del.icio.us or better still subscribing to my feed, its yummy ![]()
How geeky are you? Show off your geekness to others with this kickass room decor ideas,
Just click the images to follow up. live geek, love geek
Not sure how much this would cost, you can find out using this ball-pit-pocket-hole-calulator
At 299.98, this Ooogle sari can make great (expensive ;)) curtain
So what are you waiting for? Go ahead and make your room geekier than ever. Happy Friday
Images are not mine, hosted here. Click on them to see the original ideas and make your room geeky
Also : Make your charts super cool
Jon @ Peltiertech has taken a critical look at the partition charts suggested yesterday. You can read his review of the partition charts here. One of the commenters on his site said,
Jon, the partition chart is not that bad. It just needs to be defragmented…
![]()
So I de-fragmented my partition chart, this time it no longer provides any spatial trend cues or anything, instead its a cool little replacement for a pie chart, more so when you have just 3-4 pies and got bored of looking at pies.
Here is how in just 3 steps you can do this type of de-fragmented partition chart

This is the easy step, select a range of cells (preferably in multiples of 100, I took 300 cells, spaced over 25 columns, 12 rows) and adjust the row-height and column-width till the range looks fine enough. Take a look at this one on the right.
Lets say you want to show 3 pies, one for 30%, another for 48% and the last one for 32% (well, just kidding, you can only 110% of your work, not 110% of your pies) so 22%. The conditional formatting formulas can look like this:

Your formulas should look like this:
if cell's row-number * width + column-number is with in pie-1's range, turn the cell on to color-1
else if cell's rownumber * width + column-number is with in pie-2's range, turn the cell on to color-2
else turn the color-3 on
Well, not really, save the good old pies. There is no step 3. So I saved you … umm… 33% of work. So why dont you leave a comment and tell me what you think about this ?

While trying to understand how the Mozilla firefox search plug-ins work [ more ] I got curious and wrote a search plug-in that will take you to the first Google search result directly instead of displaying the results pages, ie mimicking the “I am feeling lucky” searches. Feel free to download and install it.
1. First Download the Google “I am feeling lucky” search plug-in for Firefox
2. Save the file in your Firefox searchplugins folder (usually, C:\Program Files\Mozilla Firefox\searchplugins, if not locate your Firefox installation directory and navigate to the ’searchplugins’ folder)
3. Restart Firefox, thats all, you now have a shiny little search add-in that can make you feel lucky…
For the curious, here is the xml file contents:
(If you are viewing this post in feedreader, you may not see the above code, in that case visit the blog to see it.)
I just took the google.xml file in the searchplugins folder and added the line

After seeing DI’s Open Your Favorite Websites Directly from Windows Vista Start post, I thought why not use Windows XP Run dialog box as a search box. So here is a simple trick that can enable you to open your favorite sites directly from XP’s run dialog box.
Using this trick you can type “g bbc” to directly open BBC website in firefox / IE.
First step is to create a batch file with the following text:
For Firefox users:
"C:\Program Files\Mozilla Firefox\firefox.exe" "http://www.google.com/search?btnI=I'm+Feeling+Lucky&q=%1"
For IE users:
"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://www.google.com/search?btnI=I'm+Feeling+Lucky&q=%1"
Save the file anywhere (preferably in C:\Program Files) with a name “g.bat”. The above one line of code essentially starts Firefox or IE and requests Google to fetch your favorite site using “I am feeling lucky” feature. The “%1″ towards end tells windows to get the first parameter followed by “g” and passes it to Google.
Before you can use this you just need to modify your environment variables. For this:
1. Right click on “my computer” and select properties
2. In the dialog box go to “advanced” tab and click on “environment variables” button

3. Select “path” from system variables and click “edit” button

4. Append “;C:\Program files” (if you have saved the batch file in some other directory mention that path here) to the path in the end (dont forget the ; before C: )

5. Click OK all the way back.
Now you can use run dialog box as Google search bar with “I am feeling lucky”, You can use the same trick to do searches on ebay, amazon, imdb, yahoo or wikipedia or anything else.
Here is a ridiculously simple workaround for those of you trying to generate an organization chart in excel:
Use google org. chart widget instead
[If you are reading this in a feedreader this post may not display properly, visit the post page instead.]
Open a new google docs spreadsheet (or work on the example organization chart spreadsheet I have created) and enter your organization employee data in the format shown below: (enter employee name in column 1 and manager name in column 2)
Create a organization chart gadget (menu > gadget > organization chart “add to sheet”), once done, the org chart should look something like this:
Its very easy to do and saves you a lot of time. If you need some example you can access the organization chart spreadsheet I have created.

Here is a simple to trick to beat the 56 color limitation in excel when you are designing a chart: use picture files (jpg, gif, png etc.) to fill the chart area.
You will no longer have to worry about limiting your project report / website / annual report etc. colors to the 56 that excel has.
1 + 3 steps to get more colors in excel charts:

Also: Download 73 beautiful excel chart templates | Art of excel charting | Become a conditional formatting pro