+ Reply to Thread
Results 1 to 8 of 8

how to pick random text value from list of database.

  1. #1
    Forum Contributor
    Join Date
    01-20-2011
    Location
    liverpool
    MS-Off Ver
    Excel 2016
    Posts
    198

    how to pick random text value from list of database.

    Hello,
    I was searching a lot to find solution on what I need but was not able to find anything.
    So in sheet 1 , column A I will have lost of 2000 words which I will populate.
    In sheet 2 I need a small window (one cell) where when I click a button MIXING VBA code randomly and quickly changes values that are taken from sheet 1, columnA.
    When I click on another button (STOP) VBA code stops one last shown value.....
    When I click MIX button - mixing continues... and VBA randomly and quickly changes values that are taken from sheet 1, columnA and again when I pres STOP button another value in the window is frozen.


    It will be good not to have repetiotion of one and the same text value upon STOP button press.


    Can this be done with VBA code???
    Thanks for your help.
    Last edited by erkamu; 12-03-2019 at 01:27 PM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: how to pick random text value from list of database.

    Perhaps post your existing code? A worksheet as described in the banner?

  3. #3
    Forum Contributor
    Join Date
    01-20-2011
    Location
    liverpool
    MS-Off Ver
    Excel 2016
    Posts
    198

    Re: how to pick random text value from list of database.

    Hello,
    Thanks for the advice. Worksheet with explanation is attached.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: how to pick random text value from list of database.

    Give these two macros a try (assign the Mix macro to your mix button and the Pick macro to your stop button)...
    Please Login or Register  to view this content.
    NOTE: That free-floating Dim PickPushed As Boolean statement is correct and must be located where shown above the two macros.

  5. #5
    Forum Contributor
    Join Date
    01-20-2011
    Location
    liverpool
    MS-Off Ver
    Excel 2016
    Posts
    198

    Re: how to pick random text value from list of database.

    Rick,
    Thanks for the proposed code. Works great. I have just make the timer faster by changing line for timer from Do Until Timer > T + 0.1 to Do Until Timer > T + 0.001.

    Could you show me how I can list all the chosen values in column h? For example first chosen text value is word3. It should appear in cell H1.
    Then I restart the mixing and stop again. shown text is word7. It should be shown in cell H2 ... and so on....

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: how to pick random text value from list of database.

    Quote Originally Posted by erkamu View Post
    Could you show me how I can list all the chosen values in column h?
    Replace the Pick macro I gave you earlier with this one...
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    01-20-2011
    Location
    liverpool
    MS-Off Ver
    Excel 2016
    Posts
    198

    Re: how to pick random text value from list of database.

    Great!!!!
    THANKS a LOT for your help RICK

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: how to pick random text value from list of database.

    Another version to try.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Random Pick from list
    By michael35 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-19-2018, 09:30 AM
  2. Random Pick from list
    By michael35 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-19-2018, 04:21 AM
  3. random pick names from a list
    By jladika in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-06-2011, 05:31 PM
  4. random pick names from the list
    By jinvictor in forum Excel General
    Replies: 1
    Last Post: 06-26-2006, 10:10 AM
  5. [SOLVED] Pick a Random name from a list.
    By David M Fritzke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2006, 12:40 PM
  6. [SOLVED] Pick a Random name from a list.
    By David M Fritzke in forum Excel General
    Replies: 8
    Last Post: 06-06-2006, 10:55 AM
  7. Pick a Random name from a list.
    By David M Fritzke in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-06-2006, 10:55 AM

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