+ Reply to Thread
Results 1 to 7 of 7

Random drawing (Randomizer) with maximo of numbers that the result can apper

  1. #1
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Lightbulb Random drawing (Randomizer) with maximo of numbers that the result can apper

    Hello Guys, please help me, all ideas are welcome.


    I need to send randomly some specific task to people, (like an automatic drawing) I have the list of the Tasks and I have the % saying how many people can be assigned to do the same thing on the day I chose.

    Any ideas, Please?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    453

    Re: Random drawing (Randomizer) with maximo of numbers that the result can apper

    Hi Diego

    I'm not sure if I understood exactly your request,
    Check the attaced book to see if it is what you need

    The basic idea is to assign a random number to each people, sort in order, and place a task in that order.

    Please Login or Register  to view this content.
    you can use the buttons Assign and Clear to play around
    Attached Files Attached Files
    Last edited by vichopalacios; 01-22-2020 at 01:48 PM.
    Barriers are there for those who don't want to dream

  3. #3
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Re: Random drawing (Randomizer) with maximo of numbers that the result can apper

    "=RANDBETWEEN(100,999)"

    Instead of numbers (100,900) it has to be the tasks NAMES (Cleaning Toliet, Cleaning Living Room, Washing Dishes)
    In addition to that I must say that 20% of the total people can be Cleaning Toilet, 30% of the amount of people can be washing Dishes and so on

    the simple formula: Index + RANDBETWEEN does the job, but I need to break down the pertage of people that I need them to work at the same task

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

    Re: Random drawing (Randomizer) with maximo of numbers that the result can apper

    I do not think you will be able to do what you want with formulas, but the following macro should do what you want...
    Please Login or Register  to view this content.
    HOW TO INSTALL MACROs
    ------------------------------------
    If you are new to macros, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. To use the macro, go back to the worksheet with your data on it and press ALT+F8, select the macro name (RandomlyAssignCleaningTasks) from the list that appears and click the Run button. The macro will execute and perform the action(s) you asked for. If you will need to do this again in this same workbook, and if you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.

  5. #5
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Re: Random drawing (Randomizer) with maximo of numbers that the result can apper

    Hello Rick Rothstein

    I am impressed, wow, I am goot at formulas but I am new to VBA, the way you wrote everything is just perfect, this is exactly what I was looking for, Can you please give me a hint of how to link the date on the cell C2 01/17/2020 and all the range from B19 down the end where the same date seats.


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

    Re: Random drawing (Randomizer) with maximo of numbers that the result can apper

    I believe this modification of the code I gave you earlier will do what you want (replace what I gave you earlier with this code)...
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-23-2015
    Location
    Barcelona
    MS-Off Ver
    2016
    Posts
    19

    Re: Random drawing (Randomizer) with maximo of numbers that the result can apper

    Actually what I wanted to do is something like this:
    IF C2 = (whatever the date is) finds these dates at the range starting from B19 down the end of the colum B:
    Just for you to understand what I did,
    I did a pivot table for the whole year with everybody, so I can filter by date and shift, so I would say that the dates are not organized, they can be anywhere in B:B, I mean if I use the filter to organize by alphabetic order or whatever, these dates will be changing on the range but they will always be B:B

    I wanted C2 to paste the info only when he finds C2 along the way, on B:B, I did not want this to overwrites what it was before,
    Once the macro is done I would be able to modify and include more condition such as shift, (Early, Late, and Night)

    I am very curious to see how you do it, and I became already a big fan, I am studying VBA but I am still too far to do this by myself.

    Thanks

+ 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. Need help with an excel formula for drawing cards off a random number
    By jamaral141989 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-19-2013, 03:59 PM
  2. Random Drawing with Mulitple Entries
    By luarwhite in forum Excel General
    Replies: 2
    Last Post: 10-01-2013, 03:50 PM
  3. Random drawing from 80 entries (16 slots) by using a button
    By shani20 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2011, 09:54 PM
  4. Random drawing from 80 entries (16 slots)
    By shani20 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-09-2011, 08:59 PM
  5. Random Drawing Multiple Entries
    By wfcperrine in forum Excel General
    Replies: 0
    Last Post: 11-02-2011, 09:34 AM
  6. Random Drawing results
    By nickydaewoo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-05-2009, 11:39 PM
  7. [SOLVED] vlookup based on random result returns incorrect result
    By rickat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2005, 09:20 AM
  8. Replies: 4
    Last Post: 03-31-2005, 11: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