+ Reply to Thread
Results 1 to 10 of 10

Trouble with CODE/IF functions

  1. #1
    Registered User
    Join Date
    04-26-2008
    Posts
    5

    Trouble with CODE/IF functions

    Any help would be very much appreciated on this one. for a course i am doing i am required to make a spreadsheet tracking student grades, which i have completed apart from one snag.
    I have used the CODE function to convert the grades to numerical values, e.g. A is 65, B is 66 etc. which has worked fine, except for the difference between F and U, which are only one grade apart yet 5 numbers apart.
    This has caused problems in a function which i am using to show how many grades above or below their predicted grade a student is, as when a student is predicted a F but acheives a U they are shown to be 5 grades below their predicted grade. the formula i used to show this is =IF(CODE(F8)=CODE(E8),0,CODE(F8)-CODE(E8))
    F8 being the predicted grade, E8 being actual grade.

    I am trying to find a way which will show that a student is only one grade below their predicted if they are predicted a F but acheive a U. prefereably without using a LOOKUP

    Thanks everyone

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Try nested IF functions

    Please Login or Register  to view this content.
    Martin

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Perhaps =MATCH(A1, {"A","B","C","D","U","F"}, 0) - MATCH(B1, {"A","B","C","D","U","F"}, 0)

    If you define (Insert > Name > Define) the array constant Grades Refers to: = {"A","B","C","D","U","F"}, then you can use

    =MATCH(A1, Grades, 0) - MATCH(B1, Grades, 0)
    Last edited by shg; 04-26-2008 at 12:54 PM.

  4. #4
    Registered User
    Join Date
    04-26-2008
    Posts
    5
    No luck, with nested if, when tried if a student was predicted a B but got a U it shows as being 3 grades below the predicted rather than 5
    Also no luck with the MATCH function. shows grades with E as predicted and U as actual as being -1 rather than -2, and using F as predicted and U as actual it shows +1 i.e they were one above their predicted
    thanks anyway
    Last edited by Darknessfalls; 04-26-2008 at 01:03 PM.

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Any better?

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-26-2008
    Posts
    5
    Unfortunately, seems to show -3 regardless of what grades are entered in either columns. trying to work out why as we speak

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Examples:
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-26-2008
    Posts
    5
    i will try the match function again but couldn't get it to work beforehand

  9. #9
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Third time lucky

    Please Login or Register  to view this content.
    double nesting this time.

  10. #10
    Registered User
    Join Date
    04-26-2008
    Posts
    5

    Smile

    Got it working thanks guys 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