Results 1 to 9 of 9

Thread: Unique Random Numbers Using Formula

  1. #1
    Member
    Join Date
    Nov 2012
    Posts
    33
    Rep Power
    0

    Unique Random Numbers Using Formula

    I am trying to complete a meal plan that uses 31 different entrees. I have column A numbered from 1 to 31. Column B has the name of the entrée.

    I want to use an "=randbetween(1,31)" to pick out an entrée number, and print out the ACTUAL NAME in the next column.

    Can that be done?

    Thanks

  2. #2
    Senior Member alansidman's Avatar
    Join Date
    Apr 2012
    Posts
    125
    Rep Power
    13
    In C1, type =RANDBETWEEN(1,31)
    in D1, type =VLOOKUP(C1,$A$1:$B$31,2,FALSE)

  3. #3
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    13
    Since you want to fix the menu for the whole month without duplicates, see the attachment
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Nov 2012
    Posts
    33
    Rep Power
    0
    In C1, type =RANDBETWEEN(1,31)
    in D1, type =VLOOKUP(C1,$A$1:$B$31,2,FALSE)
    Outstanding, thanks, but I see that there are several duplications. Any way to stop that?
    Last edited by papabill; 09-02-2014 at 03:56 PM.

  5. #5
    Member
    Join Date
    Nov 2012
    Posts
    33
    Rep Power
    0
    Since you want to fix the menu for the whole month without duplicates, see the attachment


    Attached Files File Type: xlsb __monthly menu SNB.xlsb (14.7 KB, 3 views)
    I'm sorry, but that makes no sense at all to me. Here is what I am seeing:

    aa1 0.679587508 #NAME?
    aa2 0.609065555 #NAME?

    Am I supposed to put this in a particular place on the spreadsheet?
    Last edited by papabill; 09-02-2014 at 03:55 PM.

  6. #6
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    13
    If you see #name it means:

    - you use Excel <2010
    Attached Files Attached Files

  7. #7
    Member
    Join Date
    Nov 2012
    Posts
    33
    Rep Power
    0
    Quote Originally Posted by snb View Post
    If you see #name it means:

    - you use Excel <2010
    I'm using Excel 2007

  8. #8
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Yes, so did you check the attachment posted by snb for Excel 2007
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  9. #9
    Member
    Join Date
    Nov 2012
    Posts
    33
    Rep Power
    0
    Quote Originally Posted by Excel Fox View Post
    Yes, so did you check the attachment posted by snb for Excel 2007
    Yep, just did, thanks

Similar Threads

  1. Replies: 3
    Last Post: 10-11-2013, 02:52 PM
  2. Random Numbers
    By DDon in forum Excel Help
    Replies: 3
    Last Post: 08-01-2013, 12:49 AM
  3. Unique Random Number In Ascending Order
    By marreco in forum Excel Help
    Replies: 8
    Last Post: 11-04-2012, 04:15 PM
  4. Random Unique Number Generator Excel VBA
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 5
    Last Post: 10-18-2012, 01:00 PM
  5. Generate random numbers in Excel
    By Mahesh in forum Excel Help
    Replies: 3
    Last Post: 10-06-2011, 11:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •