Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
hello
I've been struggling with a formula and could use some help. Column A shows StudentNames and column B shows Grades. The columns are sorted by A (ascend) then B (descend). I need a formula dragged down column C that shows the SUM of the TOP 3 grades of each student in the top row for that student. nb: not every student has 3 grades. For these, I'd like to sum whatever grades they have. The result should look like this: A B C 1 Bill 67 167 2 Bill 50 3 Bill 50 4 Bill 46 5 Ed 85 160 6 Ed 75 7 Sue 43 43 8 Tom ...etc drowning in formulas... Dorre |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
dorre wrote...
I've been struggling with a formula and could use some help. Column A shows StudentNames and column B shows Grades. The columns are sorted by A (ascend) then B (descend). I need a formula dragged down column C that shows the SUM of the TOP 3 grades of each student in the top row for that student. nb: not every student has 3 grades. For these, I'd like to sum whatever grades they have. The result should look like this: A B C 1 Bill 67 167 2 Bill 50 3 Bill 50 4 Bill 46 5 Ed 85 160 6 Ed 75 7 Sue 43 43 8 Tom ...etc .... The easiest way to do this, though it's somewhat inefficient, requires a different formula in the top row than in all the other rows. If your table spanned rows 1 to 100, C1 [array formula]: =SUM(LARGE((A$1:A$100=A1)*B$1:B$100,{1;2;3})) C2 [array formula]: =IF(A2<A1,SUM(LARGE((A$1:A$100=A2)*B$1:B$100,{1;2 ;3})),"") Fill C2 down into C3:C100. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Harlan - this works GREAT!!
Thanks much, Dorre "Harlan Grove" wrote in message oups.com... dorre wrote... I've been struggling with a formula and could use some help. Column A shows StudentNames and column B shows Grades. The columns are sorted by A (ascend) then B (descend). I need a formula dragged down column C that shows the SUM of the TOP 3 grades of each student in the top row for that student. nb: not every student has 3 grades. For these, I'd like to sum whatever grades they have. The result should look like this: A B C 1 Bill 67 167 2 Bill 50 3 Bill 50 4 Bill 46 5 Ed 85 160 6 Ed 75 7 Sue 43 43 8 Tom ...etc ... The easiest way to do this, though it's somewhat inefficient, requires a different formula in the top row than in all the other rows. If your table spanned rows 1 to 100, C1 [array formula]: =SUM(LARGE((A$1:A$100=A1)*B$1:B$100,{1;2;3})) C2 [array formula]: =IF(A2<A1,SUM(LARGE((A$1:A$100=A2)*B$1:B$100,{1;2 ;3})),"") Fill C2 down into C3:C100. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2 Nesting questions | Excel Worksheet Functions | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
Match / Vlookup within an Array formula | Excel Discussion (Misc queries) |