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
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

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),"")
 

Watch MrExcel Video

Forum statistics

Threads
1,122,961
Messages
5,599,061
Members
414,281
Latest member
Engjamal2021

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