+ Reply to Thread
Results 1 to 9 of 9

Using IF then to average grades on 4 point scale

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Cool Using IF then to average grades on 4 point scale

    I am a teacher and need to average grades using excell. Can you help me set up a macro that when it sees letter grades in certain columns that it will return the average of those grades in another column?
    A=4
    B=3
    C=2
    D=1
    F=0

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: Using IF then to average grades on 4 point scale

    Hi,

    This is not a macro but you could use =AVERAGEIF(A2:A6,E2,B2:B6) where A2:A6 are your letter grades, E2 is the letter grade you're trying to average for and
    B2:B6 are the grades.

    HTH
    Steve

  3. #3
    Registered User
    Join Date
    06-04-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Using IF then to average grades on 4 point scale

    Thank you for answering so soon...

    I am not trying to average for a particular letter grade...for instance.

    John Doe got a C for 3rd quarter, got an F for 4th quarter, a B on the exam...

    I would import into Excell all the students with their grades posting in each of three columns, the 3rd Qtr, 4th Qtr and Final Exam grade... in letter form.

    Excell would then take John's C and change it into a 2, the F into a 0 and a B into a 3. Once converted into numerical values, the program would then average them out to be 5/3 or 1.6667 which it would then round to nearest whole number a 2 then convert the 2 to a Letter Grade being a C for final grade.

    Each subsequent student would get the same treatment on their grades as well.

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Using IF then to average grades on 4 point scale

    Hi,

    Using helper columns and VLOOKUPs, this is easily done even in case of blank grades. Refer attachment.
    Attached Files Attached Files

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Using IF then to average grades on 4 point scale

    See if this array formula does what you want.

    =CHOOSE(ROUND(AVERAGE(IF(D3:F3<>"",LOOKUP(D3:F3,{"A","B","C","D","F"},{4,3,2,1,0}))),0)+1,"F","D","C","B","A")
    confirmed with Ctrl+Shift+Enter (instead of just Enter like normal formulas)

    It averages the grades listed in range D3:F3 - change the 2 range references in the formula to whatever the actual range is.

  6. #6
    Registered User
    Join Date
    06-04-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Using IF then to average grades on 4 point scale

    I am going to try that...it looks like it should give me a letter grade in the end right?

  7. #7
    Registered User
    Join Date
    06-04-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Using IF then to average grades on 4 point scale

    AWESOME DUDE!!! Works absolutley Great!!! THANK YOU!!!

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

    Re: Using IF then to average grades on 4 point scale

    Alternate non-array formula:
    =MID("FDCBA",ROUND(SUMPRODUCT(SEARCH(D3:F3,"FDCBA")-1)/COLUMNS(D3:F3),0)+1,1)

    Slightly improved:
    =MID("FDCBA",ROUND(AVERAGE(INDEX(SEARCH(D3:F3,"FDCBA")-1,)),0)+1,1)
    Last edited by tigeravatar; 06-04-2012 at 06:05 PM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Using IF then to average grades on 4 point scale

    You're welcome, but give tigeravatar's second suggestion a try. I haven't tried it but being non-array it would be preferable.
    Don't forget to mark your thread as SOLVED (see instructions in rule #9 by clicking Forum Rules @ top of page).

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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