+ 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,421

    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
    6,829

    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.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  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,421

    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
    6,829

    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
    MS-Off Ver
    Excel 2007
    Posts
    4,765

    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)

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