LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Random Value...

Hi all,

I know this has been covered all over with various topics but im not
sure that it fits my purpose, basically I want to select one of my 600
cells to put the value in a textbox, and randomly. But I dont want any
duplicates, so want to cycle through my values at random without
showing the same one twice, and when/if all 600 have been displayed
just to start again from the beginning.

at the moment I have:

Private Sub Thons_Click()
Randomize
Dim MyValue, MyString
A:
MyValue = Int((600 * Rnd) + 1)
MyString = Range("E" & MyValue)
If MyString = "" Then GoTo A
tbMessage.Text = MyString
End Sub

I have to put the Goto A in there because some cells in the column are
blank, and dont want to display those.

Any ideas how I can achieve this without duplicates popping up? mainly
because sometimes the first 10 displayed repeat and then you are not
sure if you have seen them all.

Any help would be much appreciated.

Many thanks

Duncan

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting random Data created from a random formula Six Sigma Blackbelt Excel Discussion (Misc queries) 1 September 11th 08 11:03 PM
Random only once Angyl Excel Worksheet Functions 3 September 13th 06 02:55 AM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
How do I find random number in list of random alpha? (Position is. jlahealth-partners Excel Discussion (Misc queries) 0 February 8th 05 05:31 PM


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"