Link to home
Start Free TrialLog in
Avatar of txdolfan
txdolfan

asked on

Select Random percentage of Text Files

I need to use VB or VBA in excel 2007 to parse a selected folder and choose a random percentage of the files within for QA. Those random files then need to be moved to a second folder for QA review. The selected filenames need to placed in a list within excel for logging purposes.

Is there an easy way to do this?
Avatar of Bill Prew
Bill Prew

So, you will specify the source folder name, the destination folder name, and the percentage of files to copy (selecting them randomly)?

~bp
I assume you mean to limit the percentage to a certain range...?  Otherwise, a "random percentage of the files" could be anywhere from 0 to 100%.  You sure you didn't mean "randomly select a percentage of the files"...?
Avatar of txdolfan

ASKER

Yes you will specify the source,destination, and percentage to be randomly selected. So no matter the total of the files I need to randomly select a given percentage, say 10%.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This solution worked perfectly and got me past my issue using VBA to move the files.
Great, glad that was useful, thanks.

~bp