Lookup with multiple criteria

All2Cheesy

Board Regular
Joined
Mar 4, 2015
Messages
127
Hello all,

I'm trying to find a value in an array using multiple criteria.


Basically, what I would be looking to achieve in the below example would be to search for A2 in E1:E4, where B2 is also greater than G2:G4, and less than H2:H4 and return the answer from F2:F4

This should output Zone 2

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Company[/TD]
[TD]Postcode[/TD]
[TD][/TD]
[TD][/TD]
[TD]Comapny[/TD]
[TD]Zone[/TD]
[TD]Postcode Range 1[/TD]
[TD]Postcode Range 2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Test123[/TD]
[TD]3015[/TD]
[TD][/TD]
[TD][/TD]
[TD]Test123[/TD]
[TD]Zone 1[/TD]
[TD]3000[/TD]
[TD]3010[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Test123[/TD]
[TD]Zone 2[/TD]
[TD]3011[/TD]
[TD]3020[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Test234[/TD]
[TD]Zone 1[/TD]
[TD]4000[/TD]
[TD]4030[/TD]
[/TR]
</tbody>[/TABLE]


Any assistance is greatly appreciated.
 

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
Hey,

Try:
=INDEX(F2:F4,MATCH(1,(A2=E2:E4)*(B2>G2:G4)*(B2 < H2:H4),0))

<h2:h4),0))
Ctrl+Shift+Entered

Result gives Zone 2

OR perhaps if you don't want an array formula:

=LOOKUP(2,1/((E2:E4=A2)*(B2>G2:G4)*(B2 < H2:H4)),F2:F4)</h2:h4),0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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