Lookup 3 column array.

DHayes

Board Regular
Joined
Nov 12, 2014
Messages
244
Good day,
I am struggling with my formula. hopefully I can get some help. I need to compare 3 columns in sheet 1 with sheet 2 and give me the result in column D. I am currently using the following formula. I am not sure what I am doing incorrectly.

=INDEX(Sheet2!D:D;MATCH(1;(Sheet2!A:A=A1)*(Sheet2!B:B=B1)*(Sheet2!C:C=C1);0))

Sheet1
town erfprt
HUMANSDORP8860
HUMANSDORP8890
THORNHILL1231
HUMANSDORP4550
HUMANSDORP2290
Sheet 2
townerfprtValue
HUMANSDORP8860100000
JEFFREYS BAY8860120000
CAPE ST FRANCIS88601200000
KRUISFONTEIN8860540000
PARADYSSTRAND8860230000
ASTON BAY1200450000
GAMTOOS MOUTH120010000
HANKEY1200120000
HUMANSDORP1200560000
JEFFREYS BAY12001500000
CAPE ST FRANCIS12003500000
Thornhill123123000
OESTERBAAI1200150000

<colgroup><col><col span="3"></colgroup><tbody>
</tbody>
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi, try this: =SUMPRODUCT(--(Sheet2!$A$2:$A$40=Sheet1!A2);--(Sheet2!$B$2:$B$40=Sheet1!B2);--(Sheet2!$C$2:$C$40=Sheet1!C2);Sheet2!$D$2:$D$40)

Note unless you really need to refer to entire columns I would limit the range to whatever is necessary in order to speed up the process.

Hope this helps.

Regard
 
Upvote 0
Hi, do let me know if it works or even if it doesnt!
 
Upvote 0
I did try it and it did not seem to work. I did come right with my one i forgot to CTL+SHIFT+ENTER.
 
Upvote 0
hmm, don't know why, though you've not shown the output you expect from the data given above so I may have misinterpreted the question.

Anyway, delighted you've got a solution even if it does use an array formula (I just have an aversion to them!).

Regards
 
Upvote 0
Should be
Code:
{=INDEX(Sheet2!$D:$D,MATCH(A1&B1&C1,Sheet2!A:A&Sheet2!B:B&Sheet2!C:C,0))}
This is an formula entered as an Array formula, meaning you DO NOT enter the brackets { }
You enter the formula and the use CTRL + SHIFT + ENTER

And yes, while the ranges indicate the entire column, it would be better to limit those ranges to speed up what can be a cumbersome formula.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

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