+ Reply to Thread
Results 1 to 5 of 5

Need to do Random fuction for urine samples

  1. #1
    Registered User
    Join Date
    03-02-2017
    Location
    masury, oh
    MS-Off Ver
    2016
    Posts
    3

    Need to do Random fuction for urine samples

    I work in a Halfway House and I was wanting to make the job a little easier.

    I want to make a list of all my residents who have to provide urine samples once a week. Is there a function I can do that will complete this for me. I want it to show the dates for the month that they will have to provide the urine next to their name. Usually there are 44 residents and all the residents have to provide 4 urine samples per month. I would like Excel to generate this list for me randomly each month. Thank you.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,267

    Re: Need to do Random fuction for urine samples

    Hi lgb and welcome to the forum,

    I think you need a Date() function where the day is a random number between 1 and 28. See the attached to see how I'd do this problem. After using the Random formula on a single month, you need to fix that date by copy and paste using values only over the formulas.

    Random Date for Test.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-02-2017
    Location
    masury, oh
    MS-Off Ver
    2016
    Posts
    3

    Re: Need to do Random fuction for urine samples

    Thank you. It is almost there. Is there a way to make them all the same month. Where i can switch something in the formula to make them all march. Than he next month make them all april.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2010
    Posts
    4,502

    Re: Need to do Random fuction for urine samples

    Month in B1, try this in B3:

    =DATE($A$1,$B$1,RANDBETWEEN(COLUMNS($A$1:A$1)*7-6,COLUMNS($A$1:A$1)*7))

  5. #5
    Registered User
    Join Date
    03-02-2017
    Location
    masury, oh
    MS-Off Ver
    2016
    Posts
    3

    Re: Need to do Random fuction for urine samples

    Thank you so much I was able to figure out how to change thee month. You are awesome. Thank you again.

+ 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. Selecting random samples from list of items without duplication
    By tanchiloong in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2013, 04:02 AM
  2. Macro for generating random samples of data and calculating stuff
    By n_ant in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2013, 04:03 AM
  3. Replies: 6
    Last Post: 12-06-2012, 08:14 PM
  4. unable to copy random samples
    By pupchix in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 03-11-2009, 11:11 PM
  5. Any Samples???
    By Krefty in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  6. Any Samples???
    By Krefty in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. Any Samples???
    By Krefty in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. [SOLVED] Any Samples???
    By Krefty in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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