Bingo Card Generator Using Microsoft Excel and Word

Categories:

Over the years, I’ve seen different variations of bingo used at networking events and holiday parties. You make a list of answers to icebreaker questions, print out the cards, and people go searching for others in the group who can give them the answers they are looking for in hopes of getting a bingo. It brings out the competitive nature of most people and lets everyone learn a thing or two about each other.

The problem with doing a bingo game like that is you have to manually make the bingo cards, download a premade set, or use one of the hundreds of online bingo card generators. Well, because I believe a problem is not worth solving if you can’t solve it with Microsoft Excel, I created an Excel spreadsheet that makes bingo cards. Not only will it allow you to control the output better, but it is also a great example of using Microsoft VBA with both Excel and Microsoft Word.

Note: If you are not into programming or doing things the hard way, use your favorite search engine to find a free, online tool to generate your bingo cards. But if you want to learn more about VBA programming and control your own destiny, read on.

How Does the Excel Bingo Card Generator Work?

The important thing about a bingo card generator is to make sure that the items in the squares on the card are random. For each 5×5 card, we need 24 random items from a list (not 25 because “Bingo” is in the middle).

This tool gets that done by:

  1. The user provides a list of items to put on the cards. The more the better
  2. Use the Excel randombetween() function to create a random number for each entry in the item table
  3. Sort by random numbers. This puts 24 new items at the top of the table
  4. The “card” on the spreadsheet, formatted cells, uses the first 24 rows from the table for each block on the card
  5. Copy that 5×5 formatted array to Word
  6. Repeat for how many ever times the user wants

Once the VBA script is done, the user has a Word file they can add a header to then send to the printer.

The tool consists of an Excel file with a VBA Macro called GenerateBingoCards. There are two sheets in the Excel workbook. The first is where you enter in your items. As you can see it also has instructions and a view of what items will end up on the card.

Excel Bingo Card Generator, The first sheet

The second sheet, “Card” has a formatted version of the card along with the only input, the number of cards you want, and a button to run the macro.

Excel Bingo Card Generator, The second sheet

Please don’t change the formatting of this table other than the colors. It is sized to fit on a single page in Word and gives you room for a header and a footer.

This is what one of the cards looks like after you add a header:

Excel Bingo Card Generator, The output

It is pretty simple, and once you have a Word file, you can do a lot with it.

The VBA Bingo Card Generator for Excel and Word

Here is the source code for the macro. It is fairly simple and the comments explain every step.

Sub GenerateBingoCards()
    ' Simple VBA Script that takes a list of bingo card 
    '    entries in Excel and generates bingo cards in word
    '      By: Eric Miller
    '          PADT, Inc
    '          www.padtinc.com
    '
    '      Version 1: First public release
    '
    ' Input: The number of cards you want. Entered as an integer in 
    '    cell C2 of sheet "Card"
    '
    ' See "Instruction" Text box in the "Input" sheet of the workbook.
    
    ' Set up MS Word objects
    '    Note, if this generates an error, make sure you go to Tools > References
    '           and check: Microsoft Word NN.N Object Library

    ' Grab the app and make it visible
    Set wordApp = New Word.Application
    wordApp.Visible = True
    
    ' Create a new doc, set orientation to Portrait and set the margins
    '   Large margim on top is for you to add your title block
    Set wordDoc = wordApp.Documents.Add()
    With wordDoc.PageSetup
        .Orientation = wdOrientPortrait
        .TopMargin = wordApp.InchesToPoints(2.5)
        .BottomMargin = wordApp.InchesToPoints(0.5)
        .RightMargin = wordApp.InchesToPoints(0.5)
        .LeftMargin = wordApp.InchesToPoints(0.5)
    End With
    
    ' Get the number of cards the user wants from cell C2
    Set wws = ThisWorkbook.Sheets("Card")
    numCards = wws.Range("C2").Value
     
    ' Identify the worksheet and and table for the input we will use in the loop
    Set iws = ThisWorkbook.Sheets("Input")
    Set itemTable = iws.ListObjects("Item_Table")
  
    ' Loop for each card requestd
    For i = 1 To numCards
        ' Go to the input sheet and clear the cut/copy buffer
        iws.Select
        Application.CutCopyMode = False
        
        ' Sort the "Item_Table" based on the random number in the second column
        '   First do an update to get new random numbers in second column.
        '   then clear, set sort fields, set options, and apply
        iws.Calculate
        With itemTable.Sort
            .SortFields.Clear
            .SortFields. _
                Add2 Key:=Range("Item_Table[[#All],[Random '#]]"), _ 
                SortOn:=xlSortOnValues, _
                Order:=xlAscending, DataOption:=xlSortNormal
            .Header = xlYes
            .MatchCase = False
            .Orientation = xlTopToBottom
            .SortMethod = xlPinYin
            .Apply
        End With
        
        ' Go to the "Card" sheet and select the formated resuls
        '    Remember, the cells in the card point to the 
        '    first 24 rows in the Item Table
        Sheets("Card").Select
        Range("A4:E8").Select
        
        ' Copy the card contents
        Selection.Copy
        
        ' Now, over in word, paste the cells as a table into word
        Set wordSel = wordApp.Selection
        wordSel.PasteExcelTable _
            LinkedToExcel:=False, _
            WordFormatting:=False, _
            RTF:=False
            
        ' Center the table on the page
        wordSel.Tables(1).Rows.Alignment = wdAlignParagraphCenter
        ' Put some spaces in so when we get to the next paste, 
        ' it will paste a new table
        wordSel.TypeText Text:="   "
    Next i
    
End Sub

Excel Bingo Card Generator Files

Downloading Microsoft Office files with macros could be one of the most dangerous things you can do on the internet, so we have prepared a version with the macro embedded and one without, and you can paste it in yourself. The zip file also has a sample Word file with 25 cards. If you are not sure how to add a macro to an Excel spreadsheet, you should probably use one of the online tools.

Go Forth and Break Ice

We offer this tool to use how you see fit, with no warranty and no restrictions. If you need help, you can try shooting us an email at info@padtinc.com. The way we use it is we give everyone a card and a pen, and they have to walk around the crowd at an event asking them, “Have you ever…?” or “Do you…?” Three out of four times, the answer starts a conversation.

Let’s be honest. This is a bit of an old-school way to make these icebreaker bingo cards. But if you are like me, you like to keep control of things and use Excel. And besides, while everyone is using the bingo cards, you can tell them, “Actually, we made these using a VBA script in Excel” as your own icebreaker.

PADT is not a networking organization or an Excel programming house. We are the Southwestern US’s premier provider of mechanical engineering products and tools. If you or anyone you know software, hardware, or consulting for simulation, product development, or 3D Printing, reach out.

Learn more about how “We Make Innovation Work” at www.padtinc.com.

Excel Bingo Card Generator
Categories

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Additive Manufacturing Success.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.


By submitting this form, you are consenting to receive marketing emails from: . You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Upcoming Events

11/15/2023

2023 Governor’s Celebration of Innovation Awards

11/15/2023

Twin Builder Updates in Ansys 2023 R2 - Webinar

11/01/2023

Webinar: Additive's Role in Factory 4.0

10/25/2023

Ansys LevelUp 2023

10/25/2023

Nerdtoberfest 2023

10/25/2023

Mechanical Updates in Ansys 2023 R2 (3) - Webinar

10/18/2023

2023 Southern Arizona Tech + Business Expo

10/18/2023

Fluent GPU Solver Updates in Ansys 2023 R2 - Webinar

10/09/2023

Structural Updates in Ansys 2023 R2 (2) - Webinar

10/02/2023

Colorado Life Sciences Innovation Forum 2023

09/27/2023

2023 AZ Bio Awards

09/26/2023

Experience Stratasys Truck Tour - Houston

09/22/2023

AIAA Rocky Mountain Section Technical Symposium 2023

09/22/2023

Experience Stratasys Truck Tour - Dallas, TX

09/21/2023

Accelerating the Energy Transition through Simulation

09/20/2023

3D Printing vs. CNC Machining - Webinar

09/13/2023

Maxwell Updates in Ansys 2023 R2 - Webinar

09/12/2023

Sandia Science & Technology Park 25th Anniversary

09/12/2023

Experience Stratasys Truck Tour - Tempe, AZ

09/08/2023

26th Annual New Mexico Flying 40 Awards

09/08/2023

New Mexico Tech Summit

09/07/2023

New Mexico Tech Summit

08/30/2023

Structures Updates in Ansys 2023 R2 (1) - Mechanical, Post & Graphics

08/23/2023

Improved Injection Molding with Additive - Webinar

08/22/2023

SPIE Optics & Photonics Exhibition 2023

08/16/2023

Fluids Updates in Ansys 2023 R2 - Webinar

08/04/2023

Experience Stratasys Truck Tour - Salt Lake City, Utah

08/01/2023

Experience Stratasys Truck Tour - Denver Colorado

07/26/2023

Solving Supply Chain Issues with Additive - Webinar

07/25/2023

Arizona Tech Leadership Golf Tournament

07/24/2023

Arizona Tech CEO Leadership Retreat

07/19/2023

System Automation & Optimization Updates in Ansys 2023 R1 - Webinar

07/13/2023

2023 AEROSPACE, AVIATION, DEFENSE AND MANUFACTURING CONFERENCE

07/12/2023

Materials Updates in Ansys Granta 2023 R1 - Webinar

06/30/2023

Turbo Expo 2023

06/29/2023

Turbo Expo 2023

06/28/2023

Turbo Expo 2023

06/28/2023

Revolutionize Packaging Design with Additive - Webinar

06/27/2023

Turbo Expo 2023

06/27/2023

2023 E-MOBILITY AND CLEAN ENERGY SUMMIT

06/26/2023

Turbo Expo 2023

06/21/2023

Optics Updates in Ansys 2023 R1 - Webinar

06/07/2023

LS-DYNA Updates in Ansys 2023 R1 - Webinar

05/31/2023

Driving Automotive Innovation with Additive - Webinar

05/24/2023

Hill Air Force Base Tech Expo

05/24/2023

Structural Updates in Ansys 2023 R1 (3) – Structural Optimization & Ex

05/23/2023

CROSSTALK 2023: Emerging Opportunities for Advanced Manufacturing Smal

05/10/2023

Signal & Power Integrity Updates in Ansys 2023 R1 - Webinar

04/26/2023

Additive Manufacturing Updates in Ansys 2023 R1 - Webinar

04/20/2023

38th Space Symposium Arizona Space Industry

More Info

04/19/2023

38th Space Symposium
Arizona Space Industry

04/19/2023

Additive Aids for Manufacturing - Webinar

04/18/2023

38th Space Symposium
Arizona Space Industry

04/17/2023

38th Space Symposium

04/13/2023

Venture Madness 2023

04/12/2023

Fluid Meshing & GPU-Solver Updates in Ansys 2023 R1 - Webinar

03/29/2023

8th Thermal and Fluids Engineering Conference

03/29/2023

Structural Updates in Ansys 2023 R1 - Composites, Fracture & MAPDL

03/28/2023

8th Thermal and Fluids Engineering Conference

03/27/2023

8th Thermal and Fluids Engineering Conference

03/26/2023

8TH Thermal and Fluids Engineering Conference

03/24/2023

Arizona BioPreneur Conference | Spring 2023

03/22/2023

2023 Arizona MedTech Conference

03/22/2023

Optimize Jigs & Fixtures with Additive - Webinar

03/15/2023

3D Design Updates in Ansys 2023 R1 - Webinar

03/08/2023

Competitive Advantages of 1D/3D Coupled Simulation - Webinar

03/01/2023

High Frequency Updates in Ansys 2023 R1 - Webinar

02/22/2023

Additive Advantages in Aerospace - Webinar

02/15/2023

Structural Updates in Ansys 2023 R1 (1) - Webinar

02/09/2023

IME 2023: MD&M | WestPack | ATX | D&M | Plastek

02/08/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

02/07/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

01/27/2023

Arizona Photonics Days, 2023

01/26/2023

Arizona Photonics Days, 2023

01/26/2023

TIPE 3D Printing | 2023

01/26/2023

Venture Cafe Phoenix Talent Night - Job Fari

01/26/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/25/2023

Arizona Photonics Days, 2023

01/25/2023

Building A.M.- Utah: Kickoff!

01/25/2023

TIPE 3D Printing | 2023

01/25/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

TIPE 3D Printing | 2023

01/18/2023

2023 AZ Tech Council Golf Tournament

12/21/2022

Simulation Best Practices for 5G Technology - Webinar

12/14/2022

Digital Twins Updates in Ansys 2022 R2 - Webinar

12/08/2022

Tech the Halls - AZ Tech Council Holiday Mixer

12/07/2022

Electric Vehicle and Other Infrastructure Update Panel

11/30/2022

SPEOS Updates in Ansys 2022 R2 - Webinar

11/23/2022

Simulation Best Practices for Electronics Reliability - Webinar

11/16/2022

Discovery Updates in Ansys 2022 R2

11/10/2022

VentureCafe Phoenix Panel: Venture Capital in AZ

11/08/2022

2022 GOVERNOR’S CELEBRATION OF INNOVATION AWARDS + TECH SHOWCASE

11/03/2022

VentureCafe Phoenix Panel: Angel Investment in AZ

11/02/2022

High & Low Frequency Electromagnetics Updates in Ansys 2022 R2

10/26/2022

Simulation Best Practices For Chip-Package-System Design & Development

10/20/2022

Nerdtoberfest 2022

10/19/2022

2022 Southern Arizona Tech + Business Expo

10/19/2022

LS-DYNA Updates in Ansys 2022 R2 - Webinar

Search in PADT site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: