+ Reply to Thread
Results 1 to 3 of 3

Custom Random Number Generator

  1. #1
    Registered User
    Join Date
    03-26-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Custom Random Number Generator

    Hello, again! I figured out how to add the developers toolbar and button and check boxes and macros, etc... I neither have the patience nor the interest to learn how to program, though. So I'm hoping someone from this community might be willing to type a few lines of code really quick for me. First I'll need to provide the details:

    I assume I need to enter the code in a macro and trigger the macro to play whenever the user click the "Randomize" button IF the "Use Random Rates" checkbox is checked. To clarify, if the "Use Random Rates" checkbox is not checked, clicking the "Randomize" button should produce no results and should not effect any other excel data.

    I want the random number generator to have two inputs and one output. One input should be a cell for the user to specify a minimum value and the other input should be to specify a maximum value. The output should be the random value generated by the macro.

    I don't know if this information is needed for the programming or not, but the input for minimum value is located at C14, and the maximum at C15. The output is at E8, and it may be necessary to overwrite an existing number in the output field. If possible, I'd like the default min. and max. input values to be 1 and 10, respectively. I'll include a screenshot as an attachment showing what I've just described for those of you who'd appreciate a visual aid. Your assistance is highly appreciated.
    Attached Images Attached Images

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Custom Random Number Generator

    Hi,

    Pictures are not much use, particularly pictures which don't even contain row numbers or column letters. Please see the forum advice about uploading actual files not jpgs. None of us want to recreate your workbook when you can simply upload it.

    However you may find RANDBETWEEN() is what you want.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-26-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Custom Random Number Generator

    I was unaware you'd need the entire workbook. If that is the case, however, here's the attachment.

    If you do the VB code/macro for me, give me your full name if you'd like credit for it. Otherwise I'll just credit the "Excel Forum MS Office Application Help Community at www.excelforum.com."
    Attached Files Attached Files

+ 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