+ Reply to Thread
Results 1 to 28 of 28

Amending an if statement

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-04-2008
    MS-Off Ver
    Office 2007/2010
    Posts
    129

    Formula Syntax assistance

    hi guys does anyone out there know why this formula does not work:

    =IF(H29=>70,"1st",IF(H29>=60AND>=69,"2:1",IF(H29>=50AND>=59,"2:2",IF(H29>=40AND<=49,"3rd"))))

    The formula is to work out the class of an honours degree for a certain student.

    thanks guys.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Should probably be:

    =IF(H29>=70,"1st",IF(AND(H29>=60,H29<=69),"2:1",IF(AND(H29>=50,H29<=59),"2:2",IF(AND(H29>=40,H29<=49),"3rd",""))))
    or more simply:

    =LOOKUP(H29,{0,40,50,60,70},{"","3rd","2:2","2:1","1st"})
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi,


    =IF(H29=>70,"1st",IF(H29>=60AND>=69,"2:1",IF(H29>= 50AND>=59,"2:2",IF(H29>=40AND<=49,"3rd"))))
    You don't need AND. The logic is: if more than 70 1st, else if more than 60, 2nd etc

    change to

    =IF(H29=>70,"1st",IF(H29>=60,"2:1",IF(H29>= 50,"2:2",IF(H29>=40,"3rd"))))
    Ed

  4. #4
    Forum Contributor
    Join Date
    03-04-2008
    MS-Off Ver
    Office 2007/2010
    Posts
    129

    thanks

    thanks guys it works now!!!

  5. #5
    Forum Contributor
    Join Date
    03-04-2008
    MS-Off Ver
    Office 2007/2010
    Posts
    129

    complex if statement

    hi guys i have an if statement that does not work here it is:

    =IF(360>J10>300,"pass","Fail")

    the if statement is to work out if a student has got a degree or not they have to have between 300 and 360 to be awarded a degree otherwise they fail.

    thanks guys!

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    =IF(and(j10<360,j10>300),"pass","Fail")

  7. #7
    Forum Contributor
    Join Date
    03-04-2008
    MS-Off Ver
    Office 2007/2010
    Posts
    129

    Amending an if statement

    hi guys i am creating a system for offering degree's and honours degree's. i need it so when the subject dissertation is taken they can be awarded an honours but when it is not taken they cannot i am using this formula which works to work out the honours at the moment =IF(H5="Fail","",IF(G29>=70,"1st",IF(G29>=60,"2:1",IF(G29>=50,"2:2",IF(G29>=40,"3rd",)))))

    is there anyway i can do this by adding anything to the formula i have already got?

    thanks guys i appreciate it alot!

  8. #8
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517
    Is this the sort of thing you are thinking of?


    =IF(OR(H5="Fail",D5="no dissertation"),"",IF(G29>=70,"1st",IF(G29>=60,"2:1",IF(G29>=50,"2:2",IF(G29>=40,"3rd",)))))

  9. #9
    Forum Contributor
    Join Date
    03-04-2008
    MS-Off Ver
    Office 2007/2010
    Posts
    129

    thanks but please explain

    thanks very much for your reply but please could you explain the D5 bit??

  10. #10
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517
    D5 is just a cell I chose at random to hold the information of if the dissertaion was handed in or not.
    Where this iformation is actually held (and what format it is held in) is entirly up to you.

    Mark.

  11. #11
    Forum Contributor
    Join Date
    03-04-2008
    MS-Off Ver
    Office 2007/2010
    Posts
    129

    thanks again

    would it be possible to do the same formula but have a range of cells where the dissertation could be??

  12. #12
    Forum Contributor
    Join Date
    03-04-2008
    MS-Off Ver
    Office 2007/2010
    Posts
    129

    edited IF statement

    Hi guys

    i have this formula below which works but where it says IF(B45="Dissertation" instead of b45 i need a range of cells where the dissertation could be.

    =IF(H5="Fail","",IF(B45="Dissertation",IF(C45>39,IF(F37>=70,"1st",IF(F37>=60,"2:1 ",IF(F37>=50,"2:2",IF(F37>=40,"3rd",)))))))

    thanks very much for your help!

+ 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