+ Reply to Thread
Results 1 to 6 of 6

Calculating Target/Actual Grades

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Calculating Target/Actual Grades

    Dear All

    I have a spreadsheet which lists students, their target grade and their actual grade as follows:

    Person 1 | A | C
    Person 2 | B | B
    Person 2 | C | B

    etc etc

    Please can you help me:

    1) Highlight as red those grades which are on target or above target;
    2) Leave as white those grades which are one grade below target;
    3) Highlight as blue those grades which are two or more grades below target;
    4) Count the number of 'red' students and the number of 'blue' students.

    I would be very grateful for any help/advice you can offer.

    Many thanks

    Daniel

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Calculating Target/Actual Grades

    djs25uk,

    Attached is an example workbook based on the sample criteria provided. I used a table to assign each Letter Grade with a Numeric Value. Named that table GradeVals.

    Using that table, I was able to add a helper column to that contains a vlookup formula to determine if the row should be red, blue, or left alone:
    Please Login or Register  to view this content.
    Once the helper column formula was copied down, the conditional formatting and countif formulas were easy.

    Hope that helps,
    ~tigeravatar
    Attached Files Attached Files

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Calculating Target/Actual Grades

    Daniel;

    This link has a section on Conditional Formatting.

    http://www.techonthenet.com/excel/questions/index.php

    I think that you will need to convert your Alpha grades to numericals to do some of the calculations, ie. A=5, B=4, C=3, etc. Otherwise how will excel understand greater than or less than.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    09-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Calculating Target/Actual Grades

    Thanks tigeravatar! The example is an enormous help. I noticed that the red and blue were evaluating correctly but when they grade is one below, it is not being left unhighlighted. I tried changing your example (playing with the +2 in the equation) but it didn't appear to make any difference. I'll keep on playing around with it.

    Many thanks for your help

    Daniel

  5. #5
    Registered User
    Join Date
    09-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Calculating Target/Actual Grades

    A good night's sleep has obviously helped. I have changed the evaluation of the "blue" to as follows and it works:

    =IF(VLOOKUP(C9,GradeVals,2,FALSE)>=VLOOKUP(B9,GradeVals,2,FALSE),"red",IF(VLOOKUP(C9,GradeVals,2,FALSE)+1<VLOOKUP(B9,GradeVals,2,FALSE),"blue",""))

    Thank you very much for your help!!

    Daniel

  6. #6
    Forum Contributor ianh's Avatar
    Join Date
    11-19-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Calculating Target/Actual Grades

    I've used a named range to do my caparisons. it removes the need for alot of vlookups
    Named range = GRADES
    Please Login or Register  to view this content.
    Then i can use conditional formatting using a formula ie
    Please Login or Register  to view this content.
    .
    altering the = for < or> depending on the rule.

    countifs can then be done using the same principals

+ 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