Need help with nested funciton using vlookup

M

mcmilja

Hello,

I need help with creating a nested function using vlookup.
I want to vlookup the cells in Column A (Port Name) and provide the data in
Column B (Path ID) and if null, provide the data in Column C (Pending Path
ID).

I basically need to combine these 2 vlookups:
=vlookup(a2,Path_ID,2,false) else
=vlookup(a2,Path_ID,3,false)

I created a table for the data below called Path_ID

Port Name Path ID Pending Path ID
T1-1/0/0:01:05 HOLT ROAD-017-1-1
T1-1/0/0:01:06 BELMONT-081-1-3

Thanks!
Jaret
 
B

Bernard Liengme

If I understand your request correctly:
=IF(ISBLANK(vlookup(a2,Path_ID,2,false),
vlookup(a2,Path_ID,3,false),vlookup(a2,Path_ID,2,false) )

This say:
IF the first lookup find only a blank THEN
use the second lookup
ELSE
use the first lookup
END_IF

but I have not tested this - so try it out and let us know

best wishes
 
M

mcmilja

Hello Bernard,

Thanks for the help! It looks like this formula just needs a little
tweaking...I received "the formula you typed contains an error"...it appears
there's an issue with the parenthesis...I looked at each individual function
and they all checked out ok...please advise...

Thanks!
Jaret
 
M

mcmilja

I figured it out...it was just missing 1 stinking parenthesis after the end
of the 1st vlookup...

=IF(ISBLANK(VLOOKUP(A2,Path_ID,2,FALSE)),VLOOKUP(A2,Path_ID,3,FALSE),VLOOKUP(A2,Path_ID,2,FALSE) )

Thanks a million for the help!

Jaret
 
M

mcmilja

Hello Bernard,

What would the formula need to look like if instead of potential null values
in the cells, they contained spaces?

instead of =IF(ISBLANK) it would be =IF(" ")

Thanks!
Jaret
 
M

mcmilja

Hello Bernard,

What would the formula need to look like if instead of potential null values
in the cells, they contained spaces?

instead of =IF(ISBLANK) it would be =IF(" ")

Thanks!
Jaret
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top