vlookup and match function

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hi, I know how to vlookup one value and match but I am trying to lookup and match the values of both the columns in data 1 with data 2 with the help of a formula. If both the values have an exact match then I want to display the name in data2 in column F or display “Not Found”.
qyerrt.xlsx
ABCDEFGHIJKLM
1Data 1FormulaData 2
2A18January1R
3B19February2Q
4C16March3P
5D15April4O
6E14May5N
7F13June6M
8G11July7L
9H11August8K
10I10September9J
11J9October10I
12K8November11H
13L5December12G
14M6January13F
15N5February14E
16O4March15D
17P2April16C
18Q2May17B
19R1June18A
Sheet1
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Below is one approach. The array formed will find multiple instances where the matches occur, but the "1" returns the one whose row number is smallest. If there might be multiple matches and you want all of the matches, then some adjustments will be necessary.
MrExcel20210129.xlsx
ABCDEFGHIJK
1Data 1FormulaData 2
2A18JuneJanuary1R
3B19 February2Q
4C16AprilMarch3P
5D15MarchApril4O
6E14FebruaryMay5N
7F13JanuaryJune6M
8G11 July7L
9H11NovemberAugust8K
10I10OctoberSeptember9J
11J9SeptemberOctober10I
12K8AugustNovember11H
13L5 December12G
14M6JuneJanuary13F
15N5MayFebruary14E
16O4AprilMarch15D
17P2 April16C
18Q2FebruaryMay17B
19R1JanuaryJune18A
Sheet2
Cell Formulas
RangeFormula
F2:F19F2=IFERROR(INDEX($I$2:$I$19,AGGREGATE(15,6,(ROW($I$2:$I$19)-ROW($I$1))/(($K$2:$K$19=D2)*($J$2:$J$19=E2)),1)),"")
 
Upvote 0
Solution
Below is one approach. The array formed will find multiple instances where the matches occur, but the "1" returns the one whose row number is smallest. If there might be multiple matches and you want all of the matches, then some adjustments will be necessary.
MrExcel20210129.xlsx
ABCDEFGHIJK
1Data 1FormulaData 2
2A18JuneJanuary1R
3B19 February2Q
4C16AprilMarch3P
5D15MarchApril4O
6E14FebruaryMay5N
7F13JanuaryJune6M
8G11 July7L
9H11NovemberAugust8K
10I10OctoberSeptember9J
11J9SeptemberOctober10I
12K8AugustNovember11H
13L5 December12G
14M6JuneJanuary13F
15N5MayFebruary14E
16O4AprilMarch15D
17P2 April16C
18Q2FebruaryMay17B
19R1JanuaryJune18A
Sheet2
Cell Formulas
RangeFormula
F2:F19F2=IFERROR(INDEX($I$2:$I$19,AGGREGATE(15,6,(ROW($I$2:$I$19)-ROW($I$1))/(($K$2:$K$19=D2)*($J$2:$J$19=E2)),1)),"")
Thank You KRice. I just replaced "" with " Not Found". It's perfect. Thanks once again.
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,172
Members
449,071
Latest member
cdnMech

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