+ Reply to Thread
Results 1 to 9 of 9

Random Numbers Into Text

Hybrid View

  1. #1
    Registered User
    Join Date
    06-15-2010
    Location
    ATL
    MS-Off Ver
    Excel 2000
    Posts
    34

    Random Numbers Into Text

    I would like to have 10 numbers compute randomly (Numbers 0-10). I would like all these numbers to come back as "No" except that the number 7 come back as "Yes". I just haven't figured out how to do it myself, lol.
    Last edited by 500bloc; 01-20-2012 at 02:07 AM.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,654

    Re: Random Numbers Into Text

    A1:
    =IF(RANDBETWEEN(0,10)=7,"Yes","No")
    Copy downwards to A11.
    Quang PT

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Random Numbers Into Text

    If you are using Excel 2003, as your profile suggests, then Randbetween() won't be available, since it is a new function in Excel 2007. In Excel 2003 and earlier you can use

    =IF(INT(RAND()*10)=7,"yes","no")

    cheers,

  4. #4
    Registered User
    Join Date
    06-15-2010
    Location
    ATL
    MS-Off Ver
    Excel 2000
    Posts
    34

    Re: Random Numbers Into Text

    Quote Originally Posted by bebo021999 View Post
    A1:
    =IF(RANDBETWEEN(0,10)=7,"Yes","No")
    Copy downwards to A11.

    Quote Originally Posted by teylyn View Post
    If you are using Excel 2003, as your profile suggests, then Randbetween() won't be available, since it is a new function in Excel 2007. In Excel 2003 and earlier you can use

    =IF(INT(RAND()*10)=7,"yes","no")

    cheers,
    I am able to use RANDBETWEEN but my problem is whenever I use either formula I get a "Err:508" code. I'm still a novice at Excel so I may not be doing something correctly.

    I wish to do this:

    A1: Random number between 0-10 (say 5)

    A2: Gives a Yes (if said number is a 7) or No depending if the randomized number is not a 7.

    If someone could upload an example I would be more than appreciative.

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

    Re: Random Numbers Into Text

    RANDBETWEEN is available in Excel 2003- in the Analysis Toolpak.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Random Numbers Into Text

    shg, thanks for that. I thought it might be, but I wasn't sure. The laptop I'm working on does not have the Analysis ToolPak installed for 2003. I tried to activate it, but the installer files are hard-wired to my work server and I'm not in that network right now. The people who prepare our standard work laptop setups need a little kick in the shins, I guess

  7. #7
    Registered User
    Join Date
    06-15-2010
    Location
    ATL
    MS-Off Ver
    Excel 2000
    Posts
    34

    Re: Random Numbers Into Text

    A little help please?

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,349

    Re: Random Numbers Into Text

    Hi 500bloc,

    See if the attached is what you desire.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  9. #9
    Registered User
    Join Date
    06-15-2010
    Location
    ATL
    MS-Off Ver
    Excel 2000
    Posts
    34

    Re: Random Numbers Into Text

    Thank you Marvin, this is exactly what I was trying to accomplish.

+ 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