+ Reply to Thread
Results 1 to 7 of 7

Formula to use random number in one field to get value of another field Weighted Lottery

  1. #1
    Registered User
    Join Date
    11-19-2014
    Location
    New York City
    MS-Off Ver
    Office for Mac 2011
    Posts
    5

    Formula to use random number in one field to get value of another field Weighted Lottery

    I am creating a weighted lottery for our apartment building to allocate a limited number of bike spaces to the residents. I have tried some weighted lottery spreadsheets that I have found on this website, but it does not seem to be quite so random. It always seems to group certain values together. I have created a spreadsheet (see attached) where each apartment unit is allotted a number of "lottery tickets" based on the percentage of common interest ("%RCI"). There are 95 Units. The value of the Apartment Unit is in Column B (2A, 2B, 2C, etc...). The square footage used to calculate the % RCI is in Column C. Column D is %RCI. Column E represents the number of lottery tickets that unit gets out of a possible 100,000 tickets based on the %RCI. A random number between 0 and 100,000 is in Column H represents the ticket number that is drawn. Columns F-G represent the beginning and end of the range of the ticket numbers for the particular unit based on the number of lottery tickets they get. What I would like to figure out is how to create a formula in column I that says: "If the random number in Column H equals a number that falls in between (including the first and last numbers) of the range Columns F-G in a particular row then the corresponding apartment unit value from that same row appears in I3. For example if "H3" is greater than or equal to "F49" but less than or equal to "G49" then the value in I3 would be the value in "B49", but if H3 is greater than or equal to "F30" but less than or equal to "G30" then the value in I3 would be the value in "B30". Could anyone help me figure out the formula for Column I? Weighted Lottery Based on % of RCI.xlsx
    Last edited by ne1ny; 12-05-2014 at 09:43 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need Help Creating a Formula

    See the workbook at https://app.box.com/s/5a06b6he6sc9ce89bbfl
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Need Help Creating a Formula

    @ne1ny

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    11-19-2014
    Location
    New York City
    MS-Off Ver
    Office for Mac 2011
    Posts
    5

    Formula to use random number in one field to get value of another field Weighted Lottery

    Quote Originally Posted by shg View Post
    I tried the workbook, but perhaps I didn't insert the rows properly. I am attaching what i did. 1 Gap Bike Room Weighted Lottery.xlsx If you look toward the bottom of the winners it looks like the winners are in order of floor number. Could you take a look and see if I inserted the fields properly?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula to use random number in one field to get value of another field Weighted Lotte

    I added your problem as a new tab in the workbook. Same link.

    Delete rows for fewer draws, or copy formulas down for additional draws.

  6. #6
    Registered User
    Join Date
    11-19-2014
    Location
    New York City
    MS-Off Ver
    Office for Mac 2011
    Posts
    5

    Re: Formula to use random number in one field to get value of another field Weighted Lotte

    Quote Originally Posted by shg View Post
    I added your problem as a new tab in the workbook. Same link.

    Delete rows for fewer draws, or copy formulas down for additional draws.
    WOW! This is perfect. Thank you so much! I really appreciate it.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula to use random number in one field to get value of another field Weighted Lotte

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Use an existing cell formula for creating a new more complex formula
    By dubcap01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 07:41 AM
  2. Replies: 1
    Last Post: 11-21-2012, 02:03 AM
  3. creating a formula
    By derrylmilburn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2010, 11:51 AM
  4. Help with creating a formula
    By Peter Barker in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2006, 02:05 PM
  5. [SOLVED] creating a formula
    By Pamela in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-23-2005, 04:06 PM

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