Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Pick a Random name from a list.
I am working on a Free Give Away of some products. Our systems give me a
list of individuals who we have had contact which are then placed in excel. We would like to pick a weekly winner and would prefer not to throw darts at my screen. Any Ideas? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Pick a Random name from a list.
If there are 1700 names in column A in cells A1:A1700, then
=OFFSET(A1,INT(1700*RAND()),0) should do the job. Jerry "David M Fritzke" wrote: I am working on a Free Give Away of some products. Our systems give me a list of individuals who we have had contact which are then placed in excel. We would like to pick a weekly winner and would prefer not to throw darts at my screen. Any Ideas? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Pick a Random name from a list.
Thanks I will give it a Try!
"Jerry W. Lewis" wrote: If there are 1700 names in column A in cells A1:A1700, then =OFFSET(A1,INT(1700*RAND()),0) should do the job. Jerry "David M Fritzke" wrote: I am working on a Free Give Away of some products. Our systems give me a list of individuals who we have had contact which are then placed in excel. We would like to pick a weekly winner and would prefer not to throw darts at my screen. Any Ideas? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Pick a Random name from a list.
Is there a way to show just the random name graphically and make this
automatic for a daily drawing that takes place at a set time daily. "Jerry W. Lewis" wrote: If there are 1700 names in column A in cells A1:A1700, then =OFFSET(A1,INT(1700*RAND()),0) should do the job. Jerry "David M Fritzke" wrote: I am working on a Free Give Away of some products. Our systems give me a list of individuals who we have had contact which are then placed in excel. We would like to pick a weekly winner and would prefer not to throw darts at my screen. Any Ideas? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Pick a Random name from a list.
Depends what you mean by graphically.
Adapting Chip Pearson's VBA Timer code at: http://www.cpearson.com/excel/ontime.htm and using Jerry's code, you could make the StartTimer sub (see below) the subject of a Workbook open event, or just run it manually. A message box will pop up at 11 a.m with the name of the winner. If you want some fancy graphics then you could design a userform containing a label, which gets populated with the name of the winner. You could show this form at the appropriate time instead of the Message box. HTH Public RunWhen As Double Public Const cRunWhat = "Winner" Sub StartTimer() RunWhen = TimeSerial(11,00,00) Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, schedule:=True End Sub Sub Winner() Dim stWinner As String StartTimer stWinner = Range("A1").Offset(Rnd() * 1700, 0) MsgBox "Today's winner is : " & stWinner End Sub On Thu, 24 Aug 2006 09:16:02 -0700, Stafford wrote: Is there a way to show just the random name graphically and make this automatic for a daily drawing that takes place at a set time daily. "Jerry W. Lewis" wrote: If there are 1700 names in column A in cells A1:A1700, then =OFFSET(A1,INT(1700*RAND()),0) should do the job. Jerry "David M Fritzke" wrote: I am working on a Free Give Away of some products. Our systems give me a list of individuals who we have had contact which are then placed in excel. We would like to pick a weekly winner and would prefer not to throw darts at my screen. Any Ideas? __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Pick a Random name from a list.
Thanks. I'll see if I can get it to work.
"Richard Buttrey" wrote: Depends what you mean by graphically. Adapting Chip Pearson's VBA Timer code at: http://www.cpearson.com/excel/ontime.htm and using Jerry's code, you could make the StartTimer sub (see below) the subject of a Workbook open event, or just run it manually. A message box will pop up at 11 a.m with the name of the winner. If you want some fancy graphics then you could design a userform containing a label, which gets populated with the name of the winner. You could show this form at the appropriate time instead of the Message box. HTH Public RunWhen As Double Public Const cRunWhat = "Winner" Sub StartTimer() RunWhen = TimeSerial(11,00,00) Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, schedule:=True End Sub Sub Winner() Dim stWinner As String StartTimer stWinner = Range("A1").Offset(Rnd() * 1700, 0) MsgBox "Today's winner is : " & stWinner End Sub On Thu, 24 Aug 2006 09:16:02 -0700, Stafford wrote: Is there a way to show just the random name graphically and make this automatic for a daily drawing that takes place at a set time daily. "Jerry W. Lewis" wrote: If there are 1700 names in column A in cells A1:A1700, then =OFFSET(A1,INT(1700*RAND()),0) should do the job. Jerry "David M Fritzke" wrote: I am working on a Free Give Away of some products. Our systems give me a list of individuals who we have had contact which are then placed in excel. We would like to pick a weekly winner and would prefer not to throw darts at my screen. Any Ideas? __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Random List Generation | Excel Worksheet Functions | |||
Random items from a list? | Excel Discussion (Misc queries) | |||
Create a pick list to use to go to a text cell in Excel | Excel Worksheet Functions | |||
Calculate Value of Cell From Pick List Choice | Excel Discussion (Misc queries) | |||
Random list (1-45) without repeating numbers? | Excel Worksheet Functions |