+ Reply to Thread
Results 1 to 2 of 2

Randomly Select Cells

  1. #1
    Registered User
    Join Date
    08-09-2007
    Posts
    1

    Randomly Select Cells

    Hi

    I am looking for a formula to select 5 random cell entries from a list in column A in Excel and put them in 5 cells say in column B.

    I have a list of resturants in column A, and I want to select a random resturant to go in 5 cells, but a resturant can only appear once in those 5 cells.

    Can anyone help?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You could try one of these ways.

    If your restaurants are in A1:A20 then put this formula in B1 and copy down to B20

    =rand()

    Then sort columns A and B, using column B as the key....and use the top 5 restaurants.

    If you don't want to alter the restaurant list then use the rand formula as before then in D1 use this formula copied down to D5 to give your 5 restaurants

    =INDEX(A$1:A$20,RANK(B1,B$1:B$20))

    Note: you can hide column B if you wish. 5 restaurants will be re-selected if worksheet re-calculates (hit F9 to to this manually)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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