+ Reply to Thread
Results 1 to 8 of 8

Weighted multiplication formula that ignores zeroes

  1. #1
    Registered User
    Join Date
    08-04-2009
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2008 (MAC OSX)
    Posts
    10

    Weighted multiplication formula that ignores zeroes

    Hi all! I'm a teaching assistant drafting a grade spreadsheet for a college course. My goal is to have two columns that tabulate the student's overall grade: one as a running total of submitted assignments, so to speak, and the other as an absolute percentage of all work required. That way, in the middle of the term we could see that a student has a 90% based on assignments completed ("running total" column), even if he would get a 46% if he stopped right there and turned nothing more in ("absolute total" column).

    jshot-155.jpg

    I figured out the "all work" column, as you can see in the screen grab, but I can't figure out how to construct a "running total" formula. The assignments are weighted to different percentages of the grade, which is a bit daunting, but my main question is how to write a formula that calculates the weighted average among finished assignments (nonzero values) while ignoring those that aren't due yet (zero values). Any advice? Thanks so much!

    -Cliff

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Weighted multiplication formula that ignores zeroes

    This solution will be improved by adding a row that gives the weights of each grade, rather than hard coding them into your formula. Here's an example.

    weighted average ignore zeroes.png

    Your original formula then becomes

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-08-2014
    Location
    Irvine, CA ,USA
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Weighted multiplication formula that ignores zeroes

    How do you distinguish between different zero's? (aren't due yet, did not turn in assignment, got 0 in test)

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Weighted multiplication formula that ignores zeroes

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff)

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    08-04-2009
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2008 (MAC OSX)
    Posts
    10

    Re: Weighted multiplication formula that ignores zeroes

    Quote Originally Posted by ckim551 View Post
    How do you distinguish between different zero's? (aren't due yet, did not turn in assignment, got 0 in test)
    Good question, and I think course policy accounts for it. In order to pass the class, all students must turn in the assignment, even after it's late enough to be an automatic F. All F's are recorded as 59, so any 0 can be ignored as either something that isn't due yet or something that is late (which would become a nonzero score once submitted).

    I should be able to post the spreadsheet in a few hours!

  6. #6
    Registered User
    Join Date
    08-04-2009
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2008 (MAC OSX)
    Posts
    10

    Re: Weighted multiplication formula that ignores zeroes

    Quote Originally Posted by FDibbins View Post
    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff)
    Fair points! Hopefully this spreadsheet got through all right. Each pair of assignment columns is set up to convert a teaching assistant's letter grade into a number grade, except for the final exam, which converts number-->letter. The N Column is where I need the weighted formula that ignores zeroes.

    200 TA Grade Spreadsheet Mockup.xlsx

    Rows 3-5 show how I would like the N column to behave while a student's course grade is still in progress, while rows 7-9 show the end-of-term result, in which the "Current" and "Final" grades are finally the same. Rows 18-24 feature the same entries as dumb data, with all of the formulas stripped away.

    As a sidebar, I would love to know how to get a formula cell (e.g., those in the I Column) to display as blank but still retain the formula--staring at a bunch of F's is distracting, and may be confusing for some of my fellow TAs!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Weighted multiplication formula that ignores zeroes

    To begin with, I would suggest using a table of values/letters instead of those nested IF's. Something like this....
    R
    S
    2
    0
    0
    3
    F
    59
    4
    D-
    63
    5
    D
    66
    6
    D+
    69
    7
    C-
    73
    8
    C
    76
    9
    C+
    79
    10
    B-
    83
    11
    B
    86
    12
    B+
    89
    13
    A-
    93
    14
    A
    97


    Then you can use this as the basis for pulling in the value...
    =VLOOKUP(C3,$R$2:$S$14,2,0)

    for the Column values, use this...
    =INDEX($R$2:$R$14,MATCH(VLOOKUP(J3,$S$2:$S$14,1,1),$S$2:$S$14,0))

    You have B+ there, but the score was 87.5, which is less than the 89 score required for B+?

  8. #8
    Registered User
    Join Date
    08-04-2009
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2008 (MAC OSX)
    Posts
    10

    Re: Weighted multiplication formula that ignores zeroes

    Quote Originally Posted by FDibbins View Post
    You have B+ there, but the score was 87.5, which is less than the 89 score required for B+?
    First of all, thank you so much, FDibbins! I'm off to a great start implementing these, but I'm afraid I don't understand how/where to apply the INDEX formula.

    200 TA Grade Spreadsheet Mockup 2.xlsx

    As for your question about the 87.5, it raises another concern of mine. The while a letter grade always converts to the same number (a "B+" always equals 89), the exam, like the final grade tabulator, must judge anything within a certain range to be a given letter grade. So, anything between 86.5 and 89.49 equals a "B+". First of all, would there be a way to use a modified LOOKUP formula in cell I3 to detect the proper grade range for the manually input value in J3, and produce the appropriate letter grade? Or should I stick with the nested IF formula, which already produces that result? Second, getting back to my primary goal, how can I write the formula for N3 that creates a weighted average while ignoring zeroes?

+ 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. Formula that ignores the 31st of each month
    By ERaasio in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2014, 02:18 PM
  2. [SOLVED] How can I use a SUM array formula that ignores letters?
    By Klemmdog in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-15-2014, 05:54 PM
  3. Replies: 2
    Last Post: 07-11-2012, 08:58 AM
  4. formula ignores last infor - please help
    By sonar in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-22-2005, 05:00 AM
  5. Replies: 2
    Last Post: 07-05-2005, 06:05 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