Closed Thread
Results 1 to 7 of 7

Difficult Excel exercise

  1. #1
    Registered User
    Join Date
    06-14-2008
    Posts
    3

    Difficult Excel exercise

    I Have the following exercise (was in swedish tried to translate it to english)

    6. When we run the following program we get 5 Random numbers 0,4567, 0,3212, 0,6318, 0,4234 and 0,1673. Whats the print-out in this case ?

    Please Login or Register  to view this content.



    And a second question is how can we write an intervall of a with other words
    -300<a<300 so that we get a random number but not the 0 !
    I wrote =100*(INT(RAND()7-3) and i get -300,-200,-100,0,100,200,300 but as I said the exercise asks for all the numbers that i wrote except the 0 ! Its imposible !
    Last edited by VBA Noob; 06-14-2008 at 10:10 AM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    sarisman

    Welcome to Exceltip forum

    Please take a couple of minutes and read the Forum Rules then edit your thread title by following the instructions in the rules (Rule 1) and wrap your VBA code (Rule 3)
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Sarisman, we cannot help directly with homework or assignments, we can give advice or steer you in the right direction but we cannot provide a solution!
    Not all forums are the same - seek and you shall find

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    For your second question......

    You could use a formula that would generate a random number 1 to 300 and then multiply by a randomly generated 1 or -1......

  5. #5
    Registered User
    Join Date
    06-14-2008
    Posts
    3
    Ok guys thanks for your replies ! Well I dont want the solution but to guide me to the right way and find the solution by myself. For example as I can understand on my first question if I change a to a = Int(0,6318*10+1) I get 7 which is the whole number of 0,6318 and so on.... Is that right do I have to do something else ?

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    sarisman,

    Please confirm you have read the forum rules as suggested by mudraker otherwise this post will be closed like your cross post

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  7. #7
    Registered User
    Join Date
    06-14-2008
    Posts
    3
    Yes I did im not so good with computers so sorry if I did something wrong hehe. Thats all I can say.

Closed 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