Random Selections Query

ben01635

New Member
Joined
Apr 17, 2009
Messages
2
Hi,

I have been tasked with creating a tool that will randomly select 'x' amount from a list of entries and distribute to 3 named persons over a 5 day week.

Basically we have 75 servers that each need to be checked once a week (5 days) by any member of a team of 3. Therefore 15 servers per day divided by 3, giving 5 checks per person per day.
I have been able to create a simple random selection in Excel to extract 15 of the 75 listed items, but my problem is I need to ensure that once an entry has been selected, it will not be selected again until the following week.
If possible I would also like to output the data into a second sheet or table that defines the persons name and the day of the week, which could be printed at the end of the week for recording purposes. The following week the whole process would begin again.
I have limited experience with Excel so am not entirely sure what I am proposing is possible. Any information or examples would be gratefully received.

Thanks in advance.... Ben :confused:
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi Ben, welcome to the board!

the simplest method may be as follows:
******** language=JavaScript src="http://www.interq.or.jp/sun/puremis/colo/popup.js">*********>
Book1
ABCDE
1ServerRandomName 1Name 2Name 3
2Server 10.454199Server 1Server 26Server 51
3Server 20.530805Server 2Server 27Server 52
4Server 30.953471Server 3Server 28Server 53
Sheet1


column A contains the server names
column B contains random numbers, formula =Rand()
column C contains Name 1 list - C2 contains the formula =A2, copied down to C26
Column D contains Name 2 list - D2 contains the formula =A27, copied down to D26
column E contains Name 3 list - E2 contains the formula =A52, copied down to E26

Then sort columns A & B using column B as the key to refresh the list.
 
Last edited:
Upvote 0
Assuming your list of servers is in a2:a76

Range("b2").Select
ActiveCell.FormulaR1C1 = "=randbetween(0,1000000)"
Range("B2").Select
Selection.AutoFill Destination:=Range("B2:B76"), Type:=xlFillDefault
Range("B2:B75").Select

Columns("B:B").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C2").Select
ActiveCell.FormulaR1C1 = "=RANK(RC[-1],RC[-1]:R[74]C[-1])"
Range("C3").Select

Range("C2").Select
ActiveCell.FormulaR1C1 = "=RANK(RC[-1],R2C2:R76C2)"
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C76"), Type:=xlFillDefault
Range("C2:C76").Select

Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]<16,""Day 1"",IF(RC[-1]<31,""Day 2"",IF(RC[-1]<46,""Day 3"",IF(RC[-1]<61,""Day 4"",""Day 5""))))"
Range("D2").Select
Selection.AutoFill Destination:=Range("D2:D76"), Type:=xlFillDefault
Range("D2:D76").Select
 
Upvote 0
Thanks very much al_b_cnu, your second solution was just the ticket!

Steve; wasn't sure if this was a Macro script or something, tried this way and got some peculiar results. I'm sure this is a case of my minimal understanding rather than your code! Thanks for the post though.
:LOL:
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top