LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 418
Default Can excel pick a random cell from a column?

Helene deChappe wrote:
I'm dong a random giveaway and have a huge list of name in an excel sheet. Is
there a way for excel to pick a random cell instead of printing, cutting and
pulling from a hat.


Try one of the following, depending on whether the names are in a
column (first one) or in a row (second one):

=offset(B3,10*rand(),0)

=offset(B3,0,10*rand())

Replace "B3" with the reference to the cell with the first name.
Replace "10" with the number of names -- or use count(B3:B12), where
"B3:B12" is the range that contains all names.

Note that if you use F9 to select more than one name (or if you put the
formula in multiple cells for that purpose), the same name might be
selected multiple times. Also note that if you save and later re-open
the worksheet, you will likely find a different name selected.

If those are problems for you, feel free to post back to ask for
solutions.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"