![]() |
Array Function to do a Sum of VLookUps that translate a letter gra
Suppose I have letter grade data in a range of cells, B12:D12 as follows
A-, B-, B+/A- I have another range of cells, named GradeList that gives numerical equivalents for each of these letter grades. I want a function that will look up each of these grades in the table, and return their sum, average etc. I tried the following as an array formula: {=SUM(VLOOKUP(B12:D12,GradeList,2,FALSE))} And it didn't work; looks like it just returns the value of the lookup of B12. Actually, I want this formula to sum the highest N grade values; I know how to use an array formula to do this with numerical data in cells. But figuring out how to do the VLookup on each letter grade cell, without having to use separate cells to contain the numbers, and then sum on numerical equivalents would be really helpful. |
Array Function to do a Sum of VLookUps that translate a letter gra
|
Array Function to do a Sum of VLookUps that translate a letter gra
Hi,
A different approach. You didn't say what your grade letters/numeric equivalent are so this formula has 15 grades F- to A+ and in ascending order each is assigned a numeric value of 1 to 15 so you should be able to modify it. Just remember that you must keep the formula 'Balanced' 10 grades * 10 numbers etc. You can substitute AVERAGE with MIN or MAX. I haven't worked out (yet) why SUM isn't working but I will but unfortunately have no more time this evening. This ARRAY formula will now averaged the numeric equivalent of the 3 grades in your range =INDEX({1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},AVERA GE(MATCH(B12:D12,{"F-","F","F+","D-","D","D+","C-","C","C+","B-","B","B+","A-","A","A+"},0))) This is an array formula which must be entered by pressing CTRL+Shift+Enter 'and not just Enter. If you do it correctly then Excel will put curly brackets 'around the formula {}. You can't type these yourself. If you edit the formula 'you must enter it again with CTRL+Shift+Enter. -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "David Morris" wrote: Suppose I have letter grade data in a range of cells, B12:D12 as follows A-, B-, B+/A- I have another range of cells, named GradeList that gives numerical equivalents for each of these letter grades. I want a function that will look up each of these grades in the table, and return their sum, average etc. I tried the following as an array formula: {=SUM(VLOOKUP(B12:D12,GradeList,2,FALSE))} And it didn't work; looks like it just returns the value of the lookup of B12. Actually, I want this formula to sum the highest N grade values; I know how to use an array formula to do this with numerical data in cells. But figuring out how to do the VLookup on each letter grade cell, without having to use separate cells to contain the numbers, and then sum on numerical equivalents would be really helpful. |
All times are GMT +1. The time now is 11:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com