+ Reply to Thread
Results 1 to 8 of 8

Randomize Name button

  1. #1
    Registered User
    Join Date
    10-05-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    3

    Randomize Name button

    I am in need of some help. I have a document that right now I have to manually input the names. I would like to enter a random button that would have the two steps.

    1. Enter the 5 names a maximum of 7 times.
    2. Not enter the name on a day of the week that the NDO is on.

    I am new to the VBA on excel and would appreciate any help that you can give.
    Attached Files Attached Files

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Randomize Name button

    Welcome to the forum!

    It looks like you may not want true randoms and want to add other limitations? It looks like you may want only 2 of the 5 names repeated and no two names in adjacent columns on the same row?

  3. #3
    Registered User
    Join Date
    10-05-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Randomize Name button

    It looks like you may not want true randoms and want to add other limitations?
    Not truly random as it will pull from the list of names at the bottom of the sheet.

    It looks like you may want only 2 of the 5 names repeated and no two names in adjacent columns on the same row?
    Correct

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Randomize Name button

    Ok.

    Step One fills the Dates with Random Names avoiding your NDO

    Click on the Randomiser button to fill the dates.
    You will notice that there is a variation in the number of times each person is listed.

    I will modify this to reduce the variation.


    1. As per Kenneths Suggestion you can stop consecutive day working by changing

    Please Login or Register  to view this content.

    to

    Please Login or Register  to view this content.


    2. This does not stop DeLeom working 10 days to Perrys 5

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 10-05-2019 at 07:39 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Registered User
    Join Date
    10-05-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Randomize Name button

    mehmetcik The code does randomize the names but it does not see that the NDO into account. It is putting the names any where.

  6. #6
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Randomize Name button

    Be sure to test on backup copy.
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Randomize Name button

    Try this code:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 10-05-2019 at 09:49 PM.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Randomize Name button

    In this code the rows in both the tables can be changed. But the format of table should be same.
    Code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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] Randomize teams button
    By Retroshift in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-21-2017, 12:18 PM
  2. Randomize
    By Valkyrie1981 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2010, 11:27 AM
  3. Randomize
    By shaun0_0 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-12-2008, 02:24 PM
  4. Randomize
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-19-2008, 06:46 AM
  5. Randomize rows
    By Robb Quirk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-03-2006, 07:35 AM
  6. Randomize
    By Davor ®upaniæ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2005, 02:05 AM
  7. How do I randomize words within a row?
    By K8 in forum Excel General
    Replies: 2
    Last Post: 05-25-2005, 05:06 PM

Tags for this Thread

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