Lookup & If Statement and Table Array

t01te6

Board Regular
Joined
Apr 3, 2008
Messages
93
Hi,

I have so tried to answer this, 5hours now and 5 forums and my brain still can't get my head around it.

I would like to return a number based on two conditions, i.e:

AreaSoilClassAreaSoil
MoraySandySandy Mineral
Moray12
Perth42

<colgroup><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>


Assuming above is two tables the first would have the area and soil type in, I want to put a formula in the class cell next to this that would look up the other table find Moray, check to see if the soil is sandy or mineral in the first table and return the site class number associated to it. In this example returning 1, but if I changed area to Perth it would return 4.

Anybody able to help, please.

Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Excel 2013 32 bit
ABCDEFGH
1AreaSoilClassAreaSoilColumn1
2MoraySandy1SandyMineral
3PerthMineral2Moray12
4MoraySandy1Perth42
5
6
7
8
9
10

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>

Formula in Class column is:
=IF([@Area]<>"",VLOOKUP([@Area],Table2,IF([@Soil]="Sandy",2,IF([@Soil]="Mineral",3)),FALSE),"")
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,321
Members
449,218
Latest member
Excel Master

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