+ Reply to Thread
Results 1 to 3 of 3

Thread: Restrict Randbetween formula to use as per my requirement

  1. #1
    Registered User
    Join Date
    05-11-2007
    Location
    Bangalore, India
    MS-Off Ver
    MS Office 2000
    Posts
    50

    Restrict Randbetween formula to use as per my requirement

    Hi All,

    I am using the Randbetween formula for Ratings. Here i have selected the numbers from 1 to 4.

    All i want to do is to restict the Randbetween formula to use "1 for 15 times", "2 for 20 times", "3 for 25 times" and "4 for 40 times" as per my requirement. Kindly let me know how can i do this?

    I have attached the excel file for your reference.

    Regards,
    Harish S
    Attached Files Attached Files
    Last edited by harishs; 03-09-2011 at 12:13 AM. Reason: Change in Subject Line

  2. #2
    Forum Guru 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Vienna, VA, USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    2,257

    re: Restrict Randbetween formula to use as per my requirement

    Excel doesn't have anything built in to do this. See attached for one suggestion.

    I have added a second sheet. This sheet has a column of 100 random numbers generated by RAND. The second column has 15 occurrences of A, 20 of B, etc. The column of random numbers is the named range RandNums. Both columns together are the named range RandomLookup.

    I have added a column of data on the first worksheet highlighted in yellow, which will replace your existing column. Each cell uses the function LARGE to pick the kth largest number from the list of random numbers, and return its corresponding letter in the adjacent column.

    There is another little table I added to confirm the distribution of these letters in the highlighted column.
    Making the world a better place one fret at a time
    ||||||

    If someone helped you, please click on the star icon at the bottom of their post

    If your problem is solved, please update the first post:
    EDIT, Go Advanced button, set Prefix to SOLVED

    [code]
    ' Enclose code in tags like this
    [/code]

    Don't attach a screenshot
    --just attach your Excel file! It's easier and will let us experiment with your data, formulas, and code.

  3. #3
    Registered User
    Join Date
    05-11-2007
    Location
    Bangalore, India
    MS-Off Ver
    MS Office 2000
    Posts
    50

    Re: Restrict Randbetween formula to use as per my requirement

    Dear 6StringJazzer,

    Thanks a ton for your help... i have modified and made use of the excel file as per my requirement.

    Once again thanks a ton...

    regards,
    Harish S

+ 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.2.0