+ Reply to Thread
Results 1 to 11 of 11

GPA calculation with grading rules given in range

  1. #1
    Registered User
    Join Date
    07-02-2021
    Location
    Pakistan
    MS-Off Ver
    MS-Excel 2007 at workplace, LibreOffice 6.4.2.2 at Home
    Posts
    8

    Question GPA calculation with grading rules given in range

    Hello there,

    I learnt vlookup formula for calculating GPA from simple grading rules. Below is the screenshot on vlookup in action with simple grading rules.

    GPA1.png

    But now I have new grading rules in which the percentage and numerical values for grades are given in a range form, not in number. Here are the new grading rules that I have to implement:

    Percentage Grade Value
    0 - 49.99 F 0.0
    50 - 54.99 D 1.00 - 1.49
    55 - 59.99 D+ 1.50 - 1.99
    60 - 64.99 C 2.00 - 2.49
    65 - 69.99 C+ 2.50 - 2.99
    70 - 74.99 B 3.00 - 3.49
    75 - 79.99 B+ 3.50 - 3.99
    80 - 89.99 A 4.00
    90 - 100 A+ 4.00


    I have no ideas how to solve this. Will only an IFS formula will solve this? But it will become very complex, isn't it? I cannot use SWITCH as it us used for exact matches.
    Any help will be appreciated.

    Kind Regards.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: GPA calculation with grading rules given in range

    Welcome to the forum.

    Your screenshot looks newer than Excel 2007, so please update your profile.

    There are instructions in the yellow banner at the top telling you how to attach your workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-02-2021
    Location
    Pakistan
    MS-Off Ver
    MS-Excel 2007 at workplace, LibreOffice 6.4.2.2 at Home
    Posts
    8

    Re: GPA calculation with grading rules given in range

    Quote Originally Posted by AliGW View Post
    Welcome to the forum.

    Your screenshot looks newer than Excel 2007, so please update your profile.

    There are instructions in the yellow banner at the top telling you how to attach your workbook.
    Thanks AliGW.

    I am editing this file at home where I have libreoffice. At the workplace, I have MS-Excel. Anyhow file has been attached as directed..
    Attached Files Attached Files

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: GPA calculation with grading rules given in range

    Cell C2 formula , Drag down and across

    HTML Code: 
    Another option

    HTML Code: 
    Cell C2 , Drag down
    =INDEX({"F";"D";"C";"B";"A"},MATCH($B2,{0;59.5;69.6;79.5;89.5}))

    Cell D2 , Drag down
    =MATCH($B2,{0;59.5;69.6;79.5;89.5})-1
    Last edited by wk9128; 07-03-2021 at 03:59 AM.

  5. #5
    Registered User
    Join Date
    07-02-2021
    Location
    Pakistan
    MS-Off Ver
    MS-Excel 2007 at workplace, LibreOffice 6.4.2.2 at Home
    Posts
    8

    Re: GPA calculation with grading rules given in range

    Quote Originally Posted by wk9128 View Post
    Cell C2 formula , Drag down and across

    HTML Code: 
    Another option

    HTML Code: 
    Dear wk9128, let me rephrase my query. The file GPA-Calculation.xlsx‎ (Attached in post#3) is working well with simple grade rules given in table range $A$17:$C$21. What I have to do is change the rules as given in the table in post#1 and then apply vlookup or whatever.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: GPA calculation with grading rules given in range

    In A16:A24 values 0,50,55,60,........

    In C2 then copied down

    =INDEX($B$16:$B$24,MATCH(B2,$A$16:$A$24,1))

    In D2 then copied down

    =INDEX($C$16:$C$24,MATCH(B2,$A$16:$A$24,1))
    Last edited by kvsrinivasamurthy; 07-03-2021 at 08:15 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: GPA calculation with grading rules given in range

    With the new grading rules laid out in a table H4:M12, GPA value in cell F4 =VLOOKUP(B4,$H$4:$M$12,4)+VLOOKUP(B4,$H$4:$M$12,6)*(B4-VLOOKUP(B4,$H$4:$H$12,1))

    GPA calculation with grading rules given in range.png
    Last edited by josephteh; 07-03-2021 at 08:58 PM.

  8. #8
    Registered User
    Join Date
    07-02-2021
    Location
    Pakistan
    MS-Off Ver
    MS-Excel 2007 at workplace, LibreOffice 6.4.2.2 at Home
    Posts
    8

    Re: GPA calculation with grading rules given in range

    Quote Originally Posted by josephteh View Post
    With the new grading rules laid out in a table H4:M12, GPA value in cell F4 =VLOOKUP(B4,$H$4:$M$12,4)+VLOOKUP(B4,$H$4:$M$12,6)*(B4-VLOOKUP(B4,$H$4:$H$12,1))

    Attachment 738932
    Sometimes words simply fail to convey the true and complete meanings.
    . However, let me say I am very much thankful to you Sir.

  9. #9
    Registered User
    Join Date
    07-02-2021
    Location
    Pakistan
    MS-Off Ver
    MS-Excel 2007 at workplace, LibreOffice 6.4.2.2 at Home
    Posts
    8

    Question Re: GPA calculation with grading rules given in range

    ... however, the story doesn't end here!

    As per institute's convention, the numerical values for grades is to be shown with only one decimal point. So I did appropriate changes in column F (Number format > one decimal point). And I noticed that if someone got 49 marks, its alphabetic grade is F (fail) yet its numerical grade is 1.0. Obviously, this is because the value 0.9704 is rounded off to 1.0 when I changed its number format from 4 decimal points to 1 decimal point.

    However, only a little tweak resolved this. Deleting
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    from Column M4 and changing its value to 0.0.

    ... however, the story doesn't end here, too !
    As per institute's convention again, the numerical values for grades 1,2,3, and 4 is to be shown with no decimal points. May we refine this?
    The file is attached again.

    Kind Regards.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: GPA calculation with grading rules given in range

    Can't you use ROUNDDOWN?

  11. #11
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: GPA calculation with grading rules given in range

    As suggested by Ali, ROUNDDOWN to 1 decimal place and change cell formatting to General.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Overtime Calculation by Day and Week Total Rules
    By meseleto in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2019, 11:24 AM
  2. Replies: 11
    Last Post: 07-20-2017, 11:26 AM
  3. Using dates for calculation rules
    By MAZA128 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-25-2015, 05:58 AM
  4. Replies: 4
    Last Post: 04-12-2015, 02:47 AM
  5. Conditional Formatting - Multiple Rules Per Range (Macro) Help Please!
    By brendanh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2013, 01:43 AM
  6. [SOLVED] Outlook 2010 - Creating Rules - Rules Constant
    By Jack7774 in forum Outlook Formatting & Functions
    Replies: 3
    Last Post: 03-18-2013, 03:48 PM
  7. [SOLVED] Can Multiple Data Validation Rules be Defined for the Same Range
    By PosseJohn in forum Excel General
    Replies: 1
    Last Post: 08-16-2012, 01:19 PM

Tags for this Thread

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