# Need to do Random fuction for urine samples

1. ## 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. ## 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

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. ## 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. ## 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.

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