• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. Macro Hacks > 87. Have a Cell Ticked or Unticked upon Selection

Have a Cell Ticked or Unticked upon Selection

Sometimes it’s difficult to make choices with checkboxes. Fortunately, you can simplify this process using a basic bit of code.

You can use Excel workbooks to collect data for surveys. Usually you do this by offering users a number of answers to choose from and placing a checkbox next to each choice. Users then check the appropriate checkboxes. The problem with using this method, though, is that your workbook soon can end up with hundreds of checkboxes.

Instead, you can use some very simple VBA code to tick any cell within a specified range as soon as it’s selected. If the cell within the specified range is ticked already, the code will remove it. The trick to the code is the use of the letter “a” in a cell whose font is set to Marlett. When it’s time to add up the results, simply use the


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint