Helped needed creating formula

Firewalker

New Member
Joined
Aug 18, 2007
Messages
13
The columns I've set up are column A is the name of the student. Column B is the name of the teacher and Column C is the student's score.

What I want to do is figure out what percentage of students made a mark higher than 85%. What's getting me is how to do this when there is more than one teacher. I'm thinking I might have to do a LOOKUP but I'm not sure.


Any suggestions for this scenario?


Thanks in advance.
 
Also, are you sure you want relative addresses on all this?


Not too sure what you mean by that.

Basically I'm looking for a way to calculate the percentage of students from a certain teacher who made a passing mark.
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Not too sure what you mean by that.

If you notice in the original formula I proposed the addresses have $ signs before the column and row, this keeps those cells the same when you copy them down. You don't have the $ signs this means when you copy them down the row reference will increment.

From the help file:

The difference between relative and absolute references

Relative references A relative cell reference in a formula, such as A1, is based on the relative position of the cell that contains the formula and the cell the reference refers to. If the position of the cell that contains the formula changes, the reference is changed. If you copy the formula across rows or down columns, the reference automatically adjusts. By default, new formulas use relative references. For example, if you copy a relative reference in cell B2 to cell B3, it automatically adjusts from =A1 to =A2.


Absolute references An absolute cell reference in a formula, such as $A$1, always refer to a cell in a specific location. If the position of the cell that contains the formula changes, the absolute reference remains the same. If you copy the formula across rows or down columns, the absolute reference does not adjust. By default, new formulas use relative references, and you need to switch them to absolute references. For example, if you copy a absolute reference in cell B2 to cell B3, it stays the same in both cells =$A$1.


Mixed references A mixed reference has either an absolute column and relative row, or absolute row and relative column. An absolute column reference takes the form $A1, $B1, and so on. An absolute row reference takes the form A$1, B$1, and so on. If the position of the cell that contains the formula changes, the relative reference is changed, and the absolute reference does not change. If you copy the formula across rows or down columns, the relative reference automatically adjusts, and the absolute reference does not adjust. For example, if you copy a mixed reference from cell A2 to B3, it adjusts from =A$1 to =B$1.
 
Upvote 0
Where does AG7:AG16 come into this? It is not in your sample.

It's also not clear how you mean what percentage of students per teacher have a passing mark as you have a percentage on every row. How does this work?
 
Upvote 0
The (AG7:AG16) is a reference to the original sheet I've been working on. You can disregard that reference.


As far as the passing mark goes. The percentage you see for example is the students final mark. What I'm looking for is what percentage of students made higher than a specific grade for their final mark. (IE 85%)


Let's say I want to know what % of students from Teacher A's class made higher than 85%. Any student that missed time, etc. would have a blank would not be counted.
 
Upvote 0
But why are you not taking one percentage for all of Teacher A, why the multiple percentages for the same teacher?
 
Upvote 0
The reason for this is each line represents a student.

Each percentage you see to the right on my sheet is the final score of the student. The list is sorted by student and the students have different teachers. Main goal is to calculate what percentage of students for each teacher made the specified mark.



My apologies for not being more clear on this. Kinda new the excel thing :)
 
Upvote 0
OK. I think this might be what you want:

List each teacher you want to check a percentage of passing students for in R2 downward.

Formula in S2:
=SUMPRODUCT(($D$2:$D$11=$R2)*($F$2:$L$11>0.85))/SUMPRODUCT(($D$2:$D$11=$R2)*ISNUMBER($F$2:$L$11))

Copy down.
Excel Workbook
ABCDEFGHIJKLMNOPQRS
1FULLIDTL10
2Student ATeacher A1094%90%88%90%100%77%85%89%Teacher A69.77%
3Student BTeacher A1085%97%100%100%94%95%100%96%Teacher B83.33%
4Student CTeacher A1095%91%77%100%93%100%88%92%
5Student DTeacher A1090%100%100%93%100%100%97%
6Student ETeacher A5100%67%84%
7Student FTeacher A1100%100%
8Student GTeacher A10100%69%60%73%83%90%86%80%
9Student HTeacher A1070%59%77%90%93%85%79%
10Student ITeacher B1083%100%100%90%100%93%94%
11Student JTeacher A0
Sheet
 
Upvote 0
Hey Pepper,

Thanks for the help so far, we're getting closer. Still an issue with the formula though.

When I calculate the averages for each student I use this formula.

=IF((SUM(F2:N2))>0,AVERAGE(F2:N2),"")

Issue is that if there are no scores for the student the formula enters the "" value in the cell under the O column.

When the formula in S2 and S3 are run the first section of =SUMPRODUCT(($D$2:$D$11=$R2)*($O$2:$O$11>0.85)) returns a true value for the cells with ("") in them. This in essence is saying that no mark is a passing mark.


So the hangup with getting this formula to work is the fact that cells which have "" in them are being considered as being >0.85.

I've included the modified sheet for you to check out.

Thanks again for your help.
Book1
ABCDEFGHIJKLMNOPQRSTU
1FULLIDTL10
2StudentATeacherB1094%90%88%90%100%77%85%89%TeacherA75.00%shouldbe50%
3StudentBTeacherA1085%97%100%100%94%95%100%96%TeacherB100.00%shouldbe75%
4StudentCTeacherB1095%91%77%100%93%100%88%92%
5StudentDTeacherA1090%100%100%93%100%100%97%
6StudentETeacherB5100%67%84%
7StudentFTeacherB0 
8StudentGTeacherA10100%69%60%73%83%90%86%80%
9StudentHTeacherA1070%59%77%90%93%85%79%
10StudentITeacherB1083%100%100%90%100%93%94%
11StudentJTeacherA0 
Sheet1
 
Upvote 0
S2:

Control+shift+enter...

Code:
=SUM(IF($D$2:$D$11=R2,
           IF(ISNUMBER($O$2:$O$11),
            IF($O$2:$O$11>85%,1))))/
  SUM(IF($D$2:$D$11=R2,
           IF(ISNUMBER($O$2:$O$11),1)))
and copy down.
 
Upvote 0
Tried that formula and got a DIV error

The previous formula should work except the fields with "" count as a passing mark.

Any ideas?
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top