+ Reply to Thread
Results 1 to 5 of 5

randomly select 30 products and copy the result

  1. #1
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    randomly select 30 products and copy the result

    Back again to ask what I hope will be a simple question to someone (Thanks again to Marcol for showing me earlier an easy way to remove an annoyance from the original file).

    In the attached sample workheet i want to randomly select 30 products and copy the result to a separate worksheet. So basically I need a macro (or something I can record to a macro) to randomly select 30 codes from column C and then copy the entire rows to a separate spreadsheet.
    As usual I will be most thankful for any guidance
    Attached Files Attached Files
    Last edited by WasWodge; 01-30-2011 at 04:36 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,228

    Re: randomly select 30 products and copy the result

    Hi Paul555555,

    If you are going to copy the entire row to a new sheet, why does it matter what is in Column C? Was one of the requirements that you need to pick a unique value of C to copy the entire row to the new sheet?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: randomly select 30 products and copy the result

    I need to randomly select 30 rows. There are some locations which have the same Pickloc but a different produ and so yes it does need to base it's random selection on the Produ code (Column C). Apologies this doesn't show it the sample I posted but I can adapt it if it makes it easier to understand.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,228

    Re: randomly select 30 products and copy the result

    Find the attached with VBA that comes close to what you requested
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: randomly select 30 products and copy the result

    Cheers Marvin, I am sure that I can adapt it to my exact requirements

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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