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
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
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
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.
Hi,
Using helper columns and VLOOKUPs, this is easily done even in case of blank grades. Refer attachment.
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.
I am going to try that...it looks like it should give me a letter grade in the end right?
AWESOME DUDE!!! Works absolutley Great!!! THANK YOU!!!
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
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).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks