# potential if/v lookup formula error

Hi Expert's Excel 2007

I am using the following formula to complete the following scenario. .
Formula:-
=IF(o5="",IF(VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0)="",VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,10,0),VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0)),"")

Scenario: sheet 1

If cell o5 is blank and sheet 2 col 14 is blank then look up col 12. If o5 is blank and col 12 is blank then look up col 14...sheet 2
###### Who is Participating?

=IFERROR(IF(AND(O5="",VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0)=""),VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,10,0),VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0),"")
0

pls provide sample file...
0

=IF(AND(O5="",IF(VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0)=""),VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,10,0),VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0)),"")
0

Commented:
Hi,

Yu speak of col 12 and 14 but in your formula you have 10 and 14

Are the col numbers relative to c or relative to a

Regards
0

Author Commented:
Hi Rgonzo

Lets stick to the col in the formula. ...

I am getting an error with it jockeys formula after =""), part..
0

Try this.  =IF(AND(O5="",IF(VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0)=""),VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,10,0),VLOOKUP(Sheet2!B2,Sheet2!\$C\$2:\$Q\$500,14,0)),""

allows to auto complete
0

As I am not in position to investigate right now.Traveling.

Thanks
0

Author Commented:
Thanks for the feedback.. works
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.