Finding matching data

garyt153

New Member
Joined
Mar 22, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a workbook with 2 sheets.

Sheet 1 has 4 columns as below:


DATEPLACENAMEANSWER
12-JanSYDJOHN?????

sheet 2 has the same 4 columns but with data in Col D.


DATEPLACENAMEDATA
1-JanSYDHARRY9.0
2-JanMELBFRED2.5
3-JanPERJOHN2.0
4-JanMELSAM3.5
5-JanSYDPETER3.5
6-JanBRISHARRY4.0
7-JanADESAM5.0
8-JanMELJACK5.0
9-JanSYDJOHN6.5
10-JanDARHARRY16.5
11-JanPERFRED
12-JanSYDJOHN7.5
13-JanBRISSAM10.0
14-JanADEPETER9.0
15-JanMELHARRY12.5
16-JanSYDSAM8.0
17-JanDARJACK10.5
18-JanPERJOHN10.8

I am trying to set up a formula to match the data in sheet 1 and find the matching data in sheet 2 - then deliver the missing data in sheet 1 Col D.

I hope I have explained it properly. In sheet 1, if A1=12 Jan, B1=SYD, C1=John is there a formula that would search sheet 2 for the correct matching data row and insert the answer (7.5) into sheet 1 D1?

Many thanks
 
like this ?
Sheet 1 is criteria
Sheet 2 is Database

Excel Formula:
=INDEX(Sheet2!D1:D19,MATCH(1,(Sheet2!A1:A19=Sheet1!A2)*(Sheet2!B1:B19=Sheet1!B2)*(Sheet2!C1:C19=Sheet1!C2),0))
 
Upvote 0
You can also try the below formula :
Excel Formula:
=XLOOKUP(CONCAT(A2:C2),Sheet2!A:A&Sheet2!B:B&Sheet2!C:C,Sheet2!D:D,"")
 
Upvote 0
In D2 of sheet1, spill out formula
Excel Formula:
=LET(a,A2:A4&B2:B4&C2:C4,da,Sheet2!A2:A19&Sheet2!B2:B19&Sheet2!C2:C19,dd,Sheet2!D2:D19,XLOOKUP(a,da,dd,"",0))
Shert1
DATEPLACENAMEANSWER
12-JanSYDJOHN7.5
05-JanSYDPETER3.5
08-JanMELJACK5

Sheet2
DATEPLACENAMEDATA
01-JanSYDHARRY9
02-JanMELBFRED2.5
03-JanPERJOHN2
04-JanMELSAM3.5
05-JanSYDPETER3.5
06-JanBRISHARRY4
07-JanADESAM5
08-JanMELJACK5
09-JanSYDJOHN6.5
10-JanDARHARRY16.5
11-JanPERFRED
12-JanSYDJOHN7.5
13-JanBRISSAM10
14-JanADEPETER9
15-JanMELHARRY12.5
16-JanSYDSAM8
17-JanDARJACK10.5
18-JanPERJOHN10.8
 
Upvote 0
Another option
Excel Formula:
=FILTER(Sheet2!D2:D100,(Sheet2!A2:A100=A2)*(Sheet2!B2:B100=B2)*(Sheet2!C2:C100=C2))
 
Upvote 0

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