Totalling coded values

T

Toppers

Given a table of exam grades and corresponding marks as below, how do I sum a
series of grades?

E.g if grades are A*,A, C & D how do I total the marks of 58, 52, 40 and 34.
Assume data is columns B to J with (some) blank column entries.

TIA.



Codes Marks
A* 58
A 52
B 46
C 40
D 34
E 28
F 22
G 16
U 0
 
M

Michael

You can create in a different section a new table that contains the
equivalent of the Letter Grade, for Example
Student 1 58 52 40 34 and Total or AVG Column
On each of the cells you have a vlookup formula that looks for the Grade on
the Table of codes and Marks and returns the marks.
 
T

Toppers

I am unable to add data as you suggest so I am looking for a formula which
will "look up" the grades and total the corresponding marks.
 
T

Teethless mama

Criterias - defined name range (eg. A2:A5)
Codes - defined name range (eg. B2:B10)
Marks - defined name range (eg. C2:C10)

=SUMPRODUCT((ISNUMBER(MATCH(Codes,Criterias,0)))*Marks)

Adjust your range to suit
 
T

Toppers

This doesn't work if a grade occurs more than once as MATCH only finds the
first occurence.

I resorted to a simple macro function to solve.

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top