Formula That Matches 2 Criteria & Gives value in another coloumn

Jamidd1

New Member
Joined
Feb 10, 2016
Messages
14
Hi Mr Excel,

I am trying to work out a formula that matches two criteria & returns the value in an adjacent cell. I can find this quite simply but I was wondering if there was a way to use an Array Formula to return all matches & not just the first or last match.

Please see example with result needed below.

Link to document as I can not upload attachments. - https://drive.google.com/file/d/1-yL_kGrDKAoZBEaVyJgKXHbqI60Qepl_/view?usp=sharing

Let me know if you need any further information.

Thank you in advance.

Jamidd
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Student NameCourse CodeQualificationDOEGRADE
JohnMF485BTEC Home Cooking Skills L2 Award GCSEQLApr-18P
JohnMF484BTEC Home Cooking Skills L1 Award GCSEQLJun-18P
John5930AQA Mathematics Entry LevelJun-18EL3
John5972Silver Step Up to EnglishJun-18X
JohnBBTJ7REdexcel English Entry Level 1/2/3 Reading
JohnBBTJ7WEdexcel English Entry Level 1/2/3 Writing
JohnBBTJ7SEdexcel English Entry Level 1/2/3 Speaking
Sam5930AQA Mathematics Entry LevelJun-18EL3
Sam5972Silver Step Up to EnglishJun-18X
SamBBTJ7REdexcel English Entry Level 1/2/3 Reading
SamBBTJ7WEdexcel English Entry Level 1/2/3 Writing
SamBBTJ7SEdexcel English Entry Level 1/2/3 Speaking
Sam5930AQA Mathematics Entry LevelJun-18X
Student NameSam
Course Code5930
Count of GRADEGRADE
EL3XGrand Total
Total112
a simple pivot table finds EL3 and x
easy to tidy up and format…………

<colgroup><col><col><col><col span="2"><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0
If you can use AGGREGATE

in G6
=IFERROR(INDEX(E$2:E$14,AGGREGATE(15,6,ROW(A$2:A$14)/((A$2:A$14=H$2)*($B$2:$B$14=H$3)),ROWS(A$2:A2))-(2-1),COLUMN()-(COLUMN()-1),1),"")
and copy down the column

or if you cant use AGGREGATE

in G6
=IFERROR(INDEX(E$2:E$14,SMALL(IF((A$2:A$14=H$2)*(B$2:B$14=H$3),ROW($A$2:$A$14)-(2-1)),ROWS($1:1))),"")
Array formula, use Ctrl-Shift-Enter
 
Upvote 0
try this in G6, and copy down


Book1
ABCDEFGH
1Student NameCourse CodeQualificationDOEGRADE
2JohnMF485BTEC Home Cooking Skills L2 Award GCSEQLApr-18PMatch Criteria 1Sam
3JohnMF484BTEC Home Cooking Skills L1 Award GCSEQLJun-18PMatch Criteria 25930
4John5930AQA Mathematics Entry LevelJun-18EL3
5John5972Silver Step Up to EnglishJun-18XResult Desired
6JohnBBTJ7REdexcel English Entry Level 1/2/3 ReadingEL3
7JohnBBTJ7WEdexcel English Entry Level 1/2/3 WritingX
8JohnBBTJ7SEdexcel English Entry Level 1/2/3 Speaking
9Sam5930AQA Mathematics Entry LevelJun-18EL3
10Sam5972Silver Step Up to EnglishJun-18X
11SamBBTJ7REdexcel English Entry Level 1/2/3 Reading
12SamBBTJ7WEdexcel English Entry Level 1/2/3 Writing
13SamBBTJ7SEdexcel English Entry Level 1/2/3 Speaking
14Sam5930AQA Mathematics Entry LevelJun-18X
Exam Input
Cell Formulas
RangeFormula
G6{=IF(COUNTIFS($A$2:$A$17,$H$2,$B$2:$B$17,$H$3)>=ROWS($G$6:G6),INDEX($E$2:$E$17,SMALL(IF($A$2:$A$17=$H$2,ROW($A$2:$A$17)-ROW($A$2)+1),ROWS($G$6:G6))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi,
A Pivot Table was my first thought but for some reason I can not get the pivot table to show the values , I can only get the pivot table to sum them. Any suggestions?

Thanks for this, great idea!

Student Name
Course Code
Qualification
DOE
GRADE
John
MF485
BTEC Home Cooking Skills L2 Award GCSEQL
Apr-18
P
John
MF484
BTEC Home Cooking Skills L1 Award GCSEQL
Jun-18
P
John
5930
AQA Mathematics Entry Level
Jun-18
EL3
John
5972
Silver Step Up to English
Jun-18
X
John
BBTJ7R
Edexcel English Entry Level 1/2/3 Reading
John
BBTJ7W
Edexcel English Entry Level 1/2/3 Writing
John
BBTJ7S
Edexcel English Entry Level 1/2/3 Speaking
Sam
5930
AQA Mathematics Entry Level
Jun-18
EL3
Sam
5972
Silver Step Up to English
Jun-18
X
Sam
BBTJ7R
Edexcel English Entry Level 1/2/3 Reading
Sam
BBTJ7W
Edexcel English Entry Level 1/2/3 Writing
Sam
BBTJ7S
Edexcel English Entry Level 1/2/3 Speaking
Sam
5930
AQA Mathematics Entry Level
Jun-18
X
Student Name
Sam
Course Code
5930
Count of GRADE
GRADE
EL3
X
Grand Total
Total
1
1
2
a simple pivot table finds EL3 and x
easy to tidy up and format…………

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,965
Messages
6,127,970
Members
449,414
Latest member
sameri

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