Home All Groups Group Topic Archive Search About

ASP/VBScript to randomly select name from csv?



Author
9 Mar 2006 8:28 PM
Scott Gordo
<!--Newbie warning-->
I've got a csv file with names, addresses, emails, etc.
I've been asked to randomly select a name from a csv file.
I've found plenty of RandNum examples, but I'm not sure how to apply it
to these names.
Can anyone point out a sample I could use?
TIA!
Scott

Author
9 Mar 2006 8:29 PM
Scott Gordo
Scott Gordo wrote:
> <!--Newbie warning-->
> I've got a csv file with names, addresses, emails, etc.
> I've been asked to randomly select a name from a csv file.
> I've found plenty of RandNum examples, but I'm not sure how to apply it
> to these names.
> Can anyone point out a sample I could use?
> TIA!
> Scott

Sorry, buy RandNum I meant Randomize.
/s
Author
10 Mar 2006 12:45 PM
MikeR
Scott Gordo wrote:
> Scott Gordo wrote:
>> <!--Newbie warning-->
>> I've got a csv file with names, addresses, emails, etc.
>> I've been asked to randomly select a name from a csv file.
>> I've found plenty of RandNum examples, but I'm not sure how to apply it
>> to these names.
>> Can anyone point out a sample I could use?
>> TIA!
>> Scott
>
> Sorry, buy RandNum I meant Randomize.
> /s
>
Read the file into an array. Use a random number (generated so that it
is within the bounds of the array) to index into the array.
MikeR

AddThis Social Bookmark Button