+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : How to select randomly 5 files from a folder/directory

  1. #1
    Registered User
    Join Date
    08-08-2008
    Location
    Johannesburg
    MS-Off Ver
    2007
    Posts
    55

    How to select randomly 5 files from a folder/directory

    Hi Guys
    I'm using this macro to create a list of all files in a specific folder
    Please Login or Register  to view this content.
    How can I improve the code so the macro will list 5 files that selected randomly?

    Many thanks for your help.
    Amit.
    Last edited by furiousfox; 11-03-2011 at 02:56 AM. Reason: Solved
    Using Excel 2007.
    Amit Cohen

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: How to select randomly 5 files from a folder/directory

    Amit,

    If you want the output to be 5 random files instead of all of them, you can use the following:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-08-2008
    Location
    Johannesburg
    MS-Off Ver
    2007
    Posts
    55

    Re: How to select randomly 5 files from a folder/directory

    Hi tigeravatar

    This is awesome,
    Works like a charm.

    Many thanks for your help.

    Amit

+ 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