Return a specific cell if two criteria is met

danielpeam

New Member
Joined
Feb 25, 2018
Messages
8
[TABLE="width: 500"]
<tbody>[TR]
[TD]Grade[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Terry[/TD]
[TD]00-01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]James[/TD]
[TD]00-01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Terry[/TD]
[TD]01-02[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Bob[/TD]
[TD]01-02[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]James[/TD]
[TD]02-03[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
TABLE 1


[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Name[/TD]
[TD]Grade[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]00-01[/TD]
[TD]Terry[/TD]
[TD]A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]01-02[/TD]
[TD]James[/TD]
[TD]C[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]00-01[/TD]
[TD]Terry[/TD]
[TD]B[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]01-02[/TD]
[TD]James[/TD]
[TD]D[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

TABLE 2

Hey guys,

I'm looking to write a formula in the 'Grade' column in table 1, which returns the grade from Table 2 if the name and date criteria are met.

Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi,

If I understand correctly:


Book1
ABC
1GradeNameDate
2ATerry00-01
3James00-01
4Terry01-02
5Bob01-02
6James02-03
7TABLE 1
8
9
10DateNameGrade
1100-01TerryA
1201-02JamesC
1300-01TerryB
1401-02JamesD
15
16TABLE 2
Sheet154
Cell Formulas
RangeFormula
A2{=IFERROR(INDEX(C$11:C$14,MATCH(B2&C2,B$11:B$14&A$11:A$14,0)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


A2 formula copied down to A6
NOTE: Array Formula to be confirmed by CSE, follow instructions above.
 
Upvote 0
This works and is amazing! Thanks!

Hi,

If I understand correctly:

ABC
GradeNameDate
ATerry00-01
James00-01
Terry01-02
Bob01-02
James02-03
TABLE 1
DateNameGrade
00-01TerryA
01-02JamesC
00-01TerryB
01-02JamesD
TABLE 2

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]

[TD="align: center"]11[/TD]

[TD="align: center"]12[/TD]

[TD="align: center"]13[/TD]

[TD="align: center"]14[/TD]

[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]16[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet154

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]A2[/TH]
[TD="align: left"]{=IFERROR(INDEX(C$11:C$14,MATCH(B2&C2,B$11:B$14&A$11:A$14,0)),"")}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]



A2 formula copied down to A6
NOTE: Array Formula to be confirmed by CSE, follow instructions above.
 
Upvote 0
You're welcome, glad it works for you.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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