Excel IF statement with vlookup

Joined
Sep 19, 2017
Messages
1
Reaction score
0
Hello, I'm trying to come up with a formula using If and vlookup. Basically, IF A1=CS, vlookup to this column if not vlookup in this column. I also need to make sure that if that vlookup doesnt find anything to return 0. Thanks!
 
Joined
Nov 14, 2017
Messages
6
Reaction score
1
It can be done and here is a example.

=IF(A1="CS",VLOOKUP(B1,M:O,3,0),VLOOKUP(C1,P:R,3,0))

Vlookup 1 is if it is CS

Vlookup 2 is if it is NOT CS obviously i have made the vlookup just look elseware on the sheet you will need to put in your own vlook up. I hope this helps
 
Joined
Nov 14, 2017
Messages
6
Reaction score
1
and if you don't find anything on the vlookups then you can up an IFERROR function before it like thus.

=IFERROR(IF(A1="CS",VLOOKUP(B1,M:O,3,0),VLOOKUP(C1,P:R,3,0)),0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top