+ Reply to Thread
Results 1 to 1 of 1

macro that generates random selection set from table

  1. #1
    Registered User
    Join Date
    12-08-2017
    Location
    Minneapolis, MN
    MS-Off Ver
    Standard 2013
    Posts
    83

    macro that generates random selection set from table

    If any of you have the misfortune of being auditors and have to make samples, I made a macro for you. The code is here and the code for the userform below.

    any time you have a table of data, you can make a sample from it. It counts the rows in the current region (so the region has to be quarantined off to work). Each row represents a possible selection. You give it your requested number of selections. It spits these out on a new worksheet, highlighted and formatted neatly. If you have a descriptive header on the table (like a row with descriptions, like qty, name, date purchased, etc) as most will, leave that box checked, otherwise uncheck and it will adjust accordingly.

    You just need the user form set up. I have never exported those. that's in your hands, hopefully it transfers right. You can get the userform file at https://github.com/webbuildermn/vba-.../VBA%20Modules "SelectionParms.frm and *.frx" and hopefully it goes easily.

    Just thought I'd share.

    Edit: fixed the range copy/paste when you select a partial custom range.

    Please Login or Register  to view this content.
    UserForm code

    Please Login or Register  to view this content.
    Last edited by foxtrotter; 10-30-2019 at 05:38 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Table column sum generates error
    By DougieJLockhart in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-03-2018, 05:36 AM
  2. Replies: 2
    Last Post: 07-29-2017, 02:17 AM
  3. Replies: 2
    Last Post: 07-29-2017, 02:17 AM
  4. Random selection option, same 'random' selection in two columns
    By applebanana in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-01-2016, 06:16 PM
  5. Random Selection Macro by Location and Ranking (High/Med/Low)
    By mamajacks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2013, 10:52 PM
  6. Excel visual basic macro that generates a charts table of contents
    By emariacher in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-14-2008, 03:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1