Sum matches from another sheet excluding duplicates

psycprof

New Member
Joined
Jul 7, 2014
Messages
19
I have a spreadsheet set up where I have courses that a student has taken, their grades, etc. on one spreadsheet and a list of gen ed's on another sheet. Example:

Sheet 1

[TABLE="width: 500"]
<tbody>[TR]
[TD]Course[/TD]
[TD]Grade Pts[/TD]
[TD]Credits[/TD]
[/TR]
[TR]
[TD]PSY 101[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]SOC 101[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]BIO 101[/TD]
[TD]3[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]JUS 101[/TD]
[TD].33[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]JUS 101[/TD]
[TD]1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]PSY 101[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]PSY 301[/TD]
[TD]4[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]


Sheet 2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Gen Ed Courses[/TD]
[/TR]
[TR]
[TD]PSY 101
[/TD]
[/TR]
[TR]
[TD]SOC 101[/TD]
[/TR]
[TR]
[TD]BIO 101[/TD]
[/TR]
[TR]
[TD]JUS 101[/TD]
[/TR]
</tbody>[/TABLE]


What I need my formula to do is count the credits only from courses that receive above .67 in grade points (column B in spreadsheet 1) and where the course in column A in spreadsheet 1 matches a course in spreadsheet 2. I also need to make sure courses are not counted more than once. So from this example, I should have 12 credits because PSY 101, SOC 101, BIO 101, and JUS 101 have all been passed with above .67 in spreadsheet 1 and appear on spreadsheet 2. PSY 301 should not be counted because it is not on spreadsheet 2. PSY 101 and JUS 101 should only be counted once because they are duplicated (and JUS 101 was failed the first time). Oh, I also need the formula to handle zeroes since the number of courses completed by each student is variable (it would go from A4:A100) for everyone. I'd appreciate any help anyone could provide!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi,
Not sure if this is what you wanted:
Given in Sheet1 cell A1

Excel 2010
ABCD
1CourseGrade PtsCreditshelper
2PSY 101231
3SOC 101431
4BIO 101331
5JUS 1010.3330
6JUS 101131
7PSY 101432
8PSY 301441
Sheet1


Add one helper column with in D2 =COUNTIFS($B$2:B2,">=1",$A$2:A2,A2) copied down till needed.
NOTE: this column can be hidden.

Given in Sheet2 cell A1

Excel 2010
AB
1Gen Ed Courses
2PSY 1013
3SOC 1013
4BIO 1013
5JUS 1013
Sheet2

Formula in B2 is =SUMIFS(Sheet1!$C$2:$C$8,Sheet1!$A$2:$A$8,Sheet2!A2,Sheet1!$B$2:$B$8,">=1",Sheet1!$D$2:$D$8,"=1")

Would that be what you needed?
 
Upvote 0
Does that formula handle duplicate values or blank cells? It does not appear to handle either. I need to make sure each course is only counted once upon passing (sometimes students retake courses for higher grades even if they passed it the first time).
 
Upvote 0
Does that formula handle duplicate values or blank cells? It does not appear to handle either. I need to make sure each course is only counted once upon passing (sometimes students retake courses for higher grades even if they passed it the first time).

Kindly be advised that based on your sample posted in thread#1 and re-posted in thread#2, the duplicates are handled as required. Does it not work as you required? The helper column in sheet1 will identify all duplicates. hence will count occurrences. The second formula in Sheet2 will take into consideration the duplicates from sheet1 as well as the value in ColumnB (Grade Pts). Would you mind posting a new short sample with blank cell including the expected results?
Thanks.
 
Upvote 0

Forum statistics

Threads
1,223,276
Messages
6,171,140
Members
452,381
Latest member
Nova88

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