Vlookup, with ifs and nesting

kz4gl7

New Member
Joined
Feb 22, 2019
Messages
3
I am having an issue with finding the correct syntax to utilize the vlookup where two criteria are met if the first vlookup returns no data. so I was thinking something like
find host on datatableA, - if there is an address value (not blank), display it; if not, then look for the host {still on datatableA}, but if the host is there AND zone is equal to "a" - then display the address value, if not on DatatableA.. then do the same lookups on DatatableB, and DatatableC... if still not found... display " not found"

here is my thought; please let me know if i am going down the correct path - or not;
iferror(vlookup(A2,[datatable]sheetA!$C,3,false),AND(if(and(vlookup("a",[datatable]sheetA!$C,2,false),vlookup(A2,[datatable]sheetA!$C,3,false)))..........


sheet-matrix
A
host
1 T123


data table:
sheetA
host zone address
T123
T123 a 456

SheetB
host zone address
T444 123

SheetC
host zone address
T555 123
T555 b 456
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
=IFERROR(vlookup-1,IFERROR(vlookup-2,IFERROR(vlookup-3,"NOT FOUND")))
 
Last edited:
Upvote 0
dont know
can you explain what the AND is doing exactly in your OP
I may have misread the original question
 
Upvote 0
sure; essentially I want to vlookup the address value first if the condition is met, great; but if not; add a second condition to the vlookup statement where the formal looks for the first condition adding the value in the zone field for the vlookup
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

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