Example VBA Macro

Simple Version

  1. Download the example macro
  2. Open it
  3. Deal with any macro warnings
    • If you get the warning "Microsoft has blocked macros from running"
      1. Close the file
      2. Right click the file and check the box under Properties > General > Unblock
      3. Reopen the file
    • Click "Enable Content" if prompted
  4. Click the "Run" button on the spreadsheet to see it work
  5. To view/edit the code
    1. Right click the "Run" button
    2. Click "Assign Macro"
    3. Click "Edit"
  6. Tweak to fit your needs
Last update: February 21, 2026