Hi, everyone. I found a problem in Excel. Can any better method be used to calculating two GPA (E2 and E7 in the following)?
Example:
Table A:
Table B:
Now, I am using following formulas in Table A:
E2=3.57=
E7=2.33=
Have any better method (reduce VLOOKUP) can be used? Thank you!
Example:
Table A:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Year[/TD]
[TD]Subject Title[/TD]
[TD]Credits[/TD]
[TD]Grade[/TD]
[TD]GPA[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Subject1[/TD]
[TD]1[/TD]
[TD]A+[/TD]
[TD]3.57[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Subject2[/TD]
[TD]2[/TD]
[TD]A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Subject3[/TD]
[TD]3[/TD]
[TD]A-[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Subject4[/TD]
[TD]3[/TD]
[TD]B+[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Subject5[/TD]
[TD]2[/TD]
[TD]B[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Subject6[/TD]
[TD]3[/TD]
[TD]B-[/TD]
[TD]2.33[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Subject7[/TD]
[TD]3[/TD]
[TD]C+[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Subject8[/TD]
[TD]3[/TD]
[TD]C[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Table B:
[TABLE="width: 144"]
<tbody>[TR]
[TD="class: xl69, width: 144, colspan: 2"]GPA[/TD]
[/TR]
[TR]
[TD="class: xl65"]A+[/TD]
[TD="class: xl66, align: right"]4.3[/TD]
[/TR]
[TR]
[TD="class: xl65"]A[/TD]
[TD="class: xl66, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: xl65"]A-[/TD]
[TD="class: xl66, align: right"]3.7[/TD]
[/TR]
[TR]
[TD="class: xl65"]B+[/TD]
[TD="class: xl66, align: right"]3.3[/TD]
[/TR]
[TR]
[TD="class: xl65"]B[/TD]
[TD="class: xl66, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl65"]B-[/TD]
[TD="class: xl66, align: right"]2.7[/TD]
[/TR]
[TR]
[TD="class: xl65"]C+[/TD]
[TD="class: xl66, align: right"]2.3[/TD]
[/TR]
[TR]
[TD="class: xl65"]C[/TD]
[TD="class: xl66, align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl65"]C-[/TD]
[TD="class: xl66, align: right"]1.7[/TD]
[/TR]
[TR]
[TD="class: xl65"]D+[/TD]
[TD="class: xl66, align: right"]1.3[/TD]
[/TR]
[TR]
[TD="class: xl65"]D[/TD]
[TD="class: xl66, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl65"]D-[/TD]
[TD="class: xl66, align: right"]0.7[/TD]
[/TR]
[TR]
[TD="class: xl67"]F[/TD]
[TD="class: xl68, align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
Now, I am using following formulas in Table A:
E2=3.57=
Code:
=ROUND((C2*VLOOKUP(D2,G3:H15,2,FALSE)+C3*VLOOKUP(D3,G3:H15,2,FALSE)+C4*VLOOKUP(D4,G3:H15,2,FALSE)+C5*VLOOKUP(D5,G3:H15,2,FALSE)+C6*VLOOKUP(D6,G3:H15,2,FALSE))/SUM(C2:C6),2)
Code:
=ROUND((C7*VLOOKUP(D7,G3:H15,2,FALSE)+C8*VLOOKUP(D8,G3:H15,2,FALSE)+C9*VLOOKUP(D9,G3:H15,2,FALSE))/SUM(C7:C9),2)