# Vlookup based on two conditions?

1. ## Vlookup based on two conditions?

I have a list of fund names in Column A. I also have currencies for these in column B. Some fund names may exist more than once but using different currencies.

I need a formula in column C which will populate data from sheet 'Master Data' based on the fund name AND currency.

So far I can only get it to look up based on the fund name, and not the currency also.

This is the formula I am currently using:
=IF(A2="","",VLOOKUP(\$A2,'Master Data'!\$A:\$F,2,FALSE))  Register To Reply

2. ## Re: Vlookup based on two conditions?

Which column on Master Data has the currency?  Register To Reply

3. ## Re: Vlookup based on two conditions?

Column C of Master Data has the currency. Apologies I forgot to mention  Register To Reply

4. ## Re: Vlookup based on two conditions?

You can use a formula like this:

=IF(OR(A2="",B2=""),"",LOOKUP(2,1/('Master Data'!\$A:\$A=\$A2)/('Master Data'!\$C:\$C=\$B2),'Master Data'!\$B:\$B))

assuming B2 has the currency in it.  Register To Reply

5. ## Re: Vlookup based on two conditions?

This worked great, thanks! Which part of the formula would I need to change to pick up data from other rows of 'Master Data' ? So I still want to look up using the fund name (column A of Master Data) and currency (column C of Master Data). But what if I wanted this to populate from column D or E or F, etc.?  Register To Reply

6. ## Re: Vlookup based on two conditions?

Apologies I have now figured this out on my own :D Thanks for the help!  Register To Reply

There are currently 1 users browsing this thread. (0 members and 1 guests) 