Excel/formula rewrite


Hi Tom

I have a student whose name is written in worksheet "SPtemplate2" cell  "i2".  The following formula is written in cell "i7"


The formula works i.e it will look for the student's target grade in "Sheet2rng" and return it in cell "i7"

However on Sheet2rng the student appears twice because they are in two different classes.  I would like to alter the formula so that cell i7 will produce the student's target grade according to the class that they are in.

The student's class is referenced in cell "x3" on worksheet "SPtemplate2".  Column "S" in worksheet "Sheet2rng" contains the list classes for each student.

Is this possible and if so could you alter the formula for me?

Thanks in advance.

Chris Mitchell

Christopher Mitchell,

If the grade is a number, then you could use SUMIFS with two conditions that make the row unique so only that single grade would be summed.  If the grade is alphanumeric then you would probably need an array formula.  

There are several different ways to use an array formula for this.  This is one way:


Entered with Ctrl+Shift+enter rather than just enter.

Tom Ogilvy
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.