Help with Vlookup and If Statements

S

SunnyM

Hey everyone,

I'm stuck with this formula:

=IF(C7="Ireland",VLOOKUP(A7,Data_Ireland,2,FALSE),IF(C7="Regions",VLOOKUP(A7,Data_Regions,2,FALSE),IF(C7="Corporate",VLOOKUP(A7,Data_Corporate,2,FALSE),"")

I've spent 4 hours on it trying to get it to work but it keep telling
me i'm missing a parenthesis. So after 4 hours of being in the same
situation as i started i've decided to ask the experts, Any ideas
anyone?

Thanks for all your help with this it's very much appreciated,

Sunny
 
K

Kevin Vaughn

It really is as simple as that. However, to get your full money's worth, I
created an alternative formula for you (the original poster (oh, that's where
they get OP from!)

=VLOOKUP(A7, CHOOSE(MATCH(C7,
{"Ireland","Regions","Corporate"},0),Data_Ireland,Data_regions,Data_corporate),2,FALSE)
 
S

SunnyM

thanks Lads much appreciated, have read up on the choose function and
didn't realise the function existed,

thanks again you guys much appreciated
 
K

Kevin Vaughn

I've seen it used here (in this newsgroup,) so decided to see if I could get
it to work, and I could.
 
Top