Help with If and Vlookup

P

petes_girl

Hi all

I think this could be a nice easy one, I have a spreadsheet across columns A
to G, with a vlookup working nicely, relating to a data worksheet with
Columns A to C:

=vlookup(A2,Data!A:C,2,false) this gives results of either a
or b

What I need it to do is if the result is a then I want column c to go into
the cell but if it is b then leave blank.

Many thanks in advance
 
P

PCLIVE

One way:

=IF(VLOOKUP(A2,Data!A:B,2,FALSE)="a",VLOOKUP(A2,Data!A:C,3),"")

Regards,
Paul
 
Top