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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

WarfritLive

Board Regular
Joined
Sep 27, 2016
Messages
149
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),"")
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,008
Messages
5,834,858
Members
430,324
Latest member
bosphoruskid

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
Top