+ Reply to Thread
Results 1 to 8 of 8

Thread: question about if function

  1. #1
    Registered User
    Join Date
    02-04-2012
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    5

    question about if function

    I try to use the if function in this case:
    I want that if H2>89 to write "A" and if not to write "B"
    what the excel do actually write: =IF(H2>89,"A","B")
    instead of turn it to "B" (because it's false)
    what am I do wrong?



    and what I need to write in this case:if H2>89 -> write "A",
    if H2>70 and H2<88 -> write "B"
    if H2<70 -> wirte "F"

  2. #2
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: question about if function

    Hi and welcome to the forum.

    Try this.

    =IF(H2>89;"A";IF(H2<70;"F";IF(AND(H2>=70;H2<=89);"B")))

    If you have to do it, then change the semi-colons to gomma!

    Hope to helps you.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    MS Office Excel 2007
    Posts
    841

    Re: question about if function

    Here's a better quicker way

    IF(H2>89,"A",IF(H2>70,"B","F"))
    Regards
    Special-K

    I rarely return to a problem once I've answered it so make sure you clearly define what the trouble is.

  4. #4
    Registered User
    Join Date
    02-04-2012
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: question about if function

    I tried to do what you say but it still do me a problem with the formula.
    Instead of writing the solution to the fomula, it wrote the formula itself on the box

  5. #5
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: question about if function

    Hi

    Take a look to the example.

    Includes both of the solutions.
    Attached Files Attached Files
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  6. #6
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,523

    Re: question about if function

    =lookup(H2,{0,71,89},{"F","B","A"})

    A more appropriate title for your thread would be: Match text to number value or Look up number and return matching text
    Last edited by Palmetto; 02-05-2012 at 08:41 AM.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  7. #7
    Registered User
    Join Date
    02-04-2012
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: question about if function

    I solved the problem.
    I just needed to change to "general" in "format cells"

  8. #8
    Registered User
    Join Date
    02-04-2012
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: question about if function

    How do I mark this thread?

+ 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.2.0