+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : IF function guess the number

  1. #1
    Registered User
    Join Date
    01-13-2011
    Location
    Piacenza
    MS-Off Ver
    Excel 2007
    Posts
    1

    IF function guess the number

    Hi everyone!

    I am trying to work on a very easy function (If) but my formula comes out wrong in excel 2007. I can't correct the mistake though. Here is what I am doing:
    A1 Random number
    A2 Guess the number (1-1000)
    A3 The number you guessed is
    B1=INT(RAND()*1000+1)
    B3=IF(B1=B2;"correct";IF(B2>B1;"too big";"too small"))

    Where is the error?

    Thanks for the help

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: IF function guess the number

    Work for me.

    You can just easily use RANDBETWEEN function, but result is same (only your is greater then 1))

    =RANDBETWEEN(1;1000)
    Attached Files Attached Files
    Last edited by zbor; 01-13-2011 at 09:59 AM.

  3. #3
    Registered User
    Join Date
    01-12-2011
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: IF function guess the number

    Your example contains semicolons ";"
    try commas ","
    =IF(B1=B2,"correct",IF(B2>B1,"too big","too small"))

+ 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