How do I use VLookup with an OR/AND statement or Nested IFs

seunao

New Member
Joined
Sep 13, 2014
Messages
4
Hello,

I have an issue I can't seem to figure out

Question: How do I combine multiple VLookups in 3 datasets into into one formula. I will like to be able to select an option in a given drop down list, it will compare different worksheets and populate data relevant to what has been selected:

Individually the below formulas work and pull the relevant data from the relevant cell, but I need to be able to put them all in one cell (one formula).

Once Group_1 set of formula are run the relevant data in Group_2 is pulled into the right column.

Group_1
=IF(ISERROR(VLOOKUP(L10,StdardCTRLREF,11,FALSE)),"",VLOOKUP(L10,StdardCTRLREF,11,FALSE))
=IF(ISERROR(VLOOKUP(L10,LclCTRLREF,11,FALSE)),"",VLOOKUP(L10,LclCTRLREF,11,FALSE))
=IF(ISERROR(VLOOKUP(L10,Generic,11,FALSE)),"",VLOOKUP(L10,Generic,11,FALSE))


Group_2
=IF($M10="Key",VLOOKUP($L10,StdardCTRLREF,5,FALSE),0)
=IF($M10="Key",VLOOKUP($L10,LclCTRLREF,5,FALSE),0)
=IF($M10="Key",VLOOKUP($L10,Generic,5,FALSE),0)


Any suggestion to achieve this is most welcome.

Thank you
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Maybe try this formula for the first group:


Code:
=IF(OR(ISERROR((VLOOKUP(L10,StdardCTRLREF,11,FALSE))),ISERROR(VLOOKUP(L10,LclCTRLREF,11,FALSE)),ISERROR(VLOOKUP(L10,Generic,11,FALSE)))=TRUE,"",CONCATENATE(VLOOKUP(L10,StdardCTRLREF,11,FALSE)," ",VLOOKUP(L10,LclCTRLREF,11,FALSE)," ",VLOOKUP(L10,Generic,11,FALSE)))

and this for the second:

Code:
=IF($M10="Key",Concatenate(VLOOKUP($L10,StdardCTRLREF,5,FALSE)," ",VLOOKUP($L10,LclCTRLREF,5,FALSE)," ",VLOOKUP($L10,Generic,5,FALSE)),0)
 
Last edited:
Upvote 0
Thanks Kuljack, unfortunately that did not work, I am unable to upload the document as I don't have permissions to attach documents, I can't upload an image either, so it is pretty difficult to explain
 
Upvote 0
What happens when you attempt the code? Do you get an error or is it just blank?

You mentioned the codes independently work, not sure why the merged code wouldn't have sufficed.

It's not necessary to upload a document, most won't open it for obvious security concerns.
 
Upvote 0
It is blank. Independently they work however not sure why they are blank
When I click on the fx - value_if_false = NA
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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