Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode.php on line 2958

Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode.php on line 2958
excel help
Results 1 to 9 of 9

Thread: excel help

  1. #1
    Forum Addict!
    Join Date
    May 2006
    Location
    in space
    Age
    38
    Posts
    1,699
    Rep Power
    287

    Default excel help

    hi, im not very good with excel and need some help

    i need to generate 3 random numbers between 0 and 9, and the numbers cannot be the same

    ive been using the randbetween() function, but im just struggling to get them so they do not show the same numbers

    please any help will be much appriciated

    and id prefer not to use VB, if it is possible

    many thanks





  2. #2
    Loyal Member Evil_Genious's Avatar
    Join Date
    May 2007
    Location
    The Future
    Posts
    3,753
    Rep Power
    813

    Default

    I'm not really a Excel programmer LOL.

    But my penis tells me you need something called a "conditional" here.

    i.e. you need to create a formula in a cell. So you say that randbetween() is a function which 'generates a random number between', assuming this is the case do something like the following. What the syntax is - is perhaps irrelevent.

    Say you have a matrix A1 to E1 horizontal and A1 to A5.

    If you want to generate a random number in A1 you would write randbetween();

    So now you have a number to start with.

    in A2 you want to a 'Do While' loop or something similar - if you are using VB, there must be a phenomenon as such.

    would be something like:

    Do randbetween() while (A2 == A1);

    This will execute randbetween once and then evaluate the conditional statement, and if A2 'is equal to' A1 then another randbetween is done, until the condition evaluates to False. i.e. when the value is unique.

    Subsequent formulas will be similar but with different cells:

    A3:

    Do randbetween() while (A3 == A1 || A3 == A2 || A3 == n);

    etc......

    With syntax, I can't help you.

    "I'll let you break me off, but I won't let you break my heart"

  3. #3
    Forum Addict!
    Join Date
    May 2006
    Location
    in space
    Age
    38
    Posts
    1,699
    Rep Power
    287

    Default

    ive jsut cheated and done this

    =RANDBETWEEN(2,7)
    =RANDBETWEEN(0,D10-1)
    =RANDBETWEEN(D10+1, 9)

    but what you say sounds better, ill give it a go tomorrow, but one question is that a visual basic code, coz im not using any VB

    but thanks for helping anyways





  4. #4
    Loyal Member Evil_Genious's Avatar
    Join Date
    May 2007
    Location
    The Future
    Posts
    3,753
    Rep Power
    813

    Default

    LOL yeah I see what you mean, but that formula is flawed!

    Say the first number generated is 4 (which is D10) the second number will have a roof of 3 (because 4-1 is 3). Plus thats not really a random number, because you're confining it to logic.

    I'm pretty sure there's a loop in there somewhere. Else why would there be mention of VB? At the mo you're only using a bog Excel function.

    "I'll let you break me off, but I won't let you break my heart"

  5. #5
    Forum Addict!
    Join Date
    May 2006
    Location
    in space
    Age
    38
    Posts
    1,699
    Rep Power
    287

    Default

    i know its flawed, but im so pissed off with this shit, that i just dont care anymore, perhaps in the morning ill feel differently, been sitting in this library since 3pm doing nothing but coursework alll day

    but yea cheers,,,,,and if anyone else who can come up with a better function id very much appreciate it





  6. #6
    Forum Addict!
    Join Date
    May 2006
    Location
    in space
    Age
    38
    Posts
    1,699
    Rep Power
    287

    Default

    just an update i fixed it, i joined some excel forum and got someone else to do the whole thing for me

    shoulda done that from the start instead of wasting so much time





  7. #7
    Forum Addict!
    Join Date
    May 2006
    Location
    in space
    Age
    38
    Posts
    1,699
    Rep Power
    287

    Default

    Quote Originally Posted by Evil_Genious View Post
    I'm not really a Excel programmer LOL.

    But my penis tells me you need something called a "conditional" here.

    i.e. you need to create a formula in a cell. So you say that randbetween() is a function which 'generates a random number between', assuming this is the case do something like the following. What the syntax is - is perhaps irrelevent.

    Say you have a matrix A1 to E1 horizontal and A1 to A5.

    If you want to generate a random number in A1 you would write randbetween();

    So now you have a number to start with.

    in A2 you want to a 'Do While' loop or something similar - if you are using VB, there must be a phenomenon as such.

    would be something like:

    Do randbetween() while (A2 == A1);

    This will execute randbetween once and then evaluate the conditional statement, and if A2 'is equal to' A1 then another randbetween is done, until the condition evaluates to False. i.e. when the value is unique.

    Subsequent formulas will be similar but with different cells:

    A3:

    Do randbetween() while (A3 == A1 || A3 == A2 || A3 == n);

    etc......

    With syntax, I can't help you.

    hahahaha i just got that now, i was quite stressed earlier so i didnt get that bit





  8. #8
    Loyal Member Evil_Genious's Avatar
    Join Date
    May 2007
    Location
    The Future
    Posts
    3,753
    Rep Power
    813

    Default

    Quote Originally Posted by vertigo View Post
    just an update i fixed it, i joined some excel forum and got someone else to do the whole thing for me

    shoulda done that from the start instead of wasting so much time

    Show us the answer blad.

    "I'll let you break me off, but I won't let you break my heart"

  9. #9
    Forum Addict!
    Join Date
    May 2006
    Location
    in space
    Age
    38
    Posts
    1,699
    Rep Power
    287

    Default

    i did rand() from A1:A10

    then
    =RANK(A1,$A$1:$A$10)-1
    =RANK(A2,$A$1:$A$10)-1
    =RANK(A3,$A$1:$A$10)-1


    but!!!!! ive been going about this whole assignment wrong from the start....ididnt actually have to do that from the start, its a long thing to explain





Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mithun Chakraborty in London Excel
    By darkcolour in forum Bollywood and Hollywood + TV!
    Replies: 30
    Last Post: 24-09-2008, 02:31
  2. Formulae on Excel
    By DJ B4VVY in forum General Discussion
    Replies: 1
    Last Post: 11-02-2008, 23:08
  3. Microsoft Excel
    By Confuzzled in forum University
    Replies: 11
    Last Post: 28-01-2008, 15:37
  4. Deleting worksheet's in Excel?
    By JATT_UNIT in forum General Discussion
    Replies: 20
    Last Post: 31-12-2007, 15:47
  5. Motor Show 20-30th July 06 @ Excel, London
    By sexy_kuri in forum The Lounge
    Replies: 0
    Last Post: 22-06-2006, 11:30

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
  •  
About us
The Asian Place is the best Desi social Asian Forum on the internet - who needs Facebook?

We have the greatest membership of adults on our boards doing what they do best, having fun, socialising and sharing cultures! We have some of the greatest moderators on our boards who ensure you receive the best and only the best experience from our forums.

The Asian Place was first established in August 08, 2004 where it began on a free forum provider, there were limitations in running a free forum so we had to migrate to our own servers leaving a years worth of data. Nevertheless we're here to take show you how to have fun the Desi way! We are dedicated in bringing you the best online experience like you have never experienced before! Join us today and find out for yourself! Our ideas are always unique if not different than any other place you will find on the internet.

Remember there's facebook and there's us the two are not the same.
Links
- Twitter
- Facebook
Follow us! #TheAsianPlace
Join Today
Join today for an epic time @ The Asian Place! Register Now