If(and( using vlookup

brooksc29

Active Member
Joined
Jul 25, 2010
Messages
333
I'm trying to say if "Vlookup1"=0 and "Vlookup2"=0, then leave blank, if not, the Vlookup3... however, it's returning 0 and not " ".

=IF(AND(VLOOKUP($L4,PITCHERScompLIST,93,FALSE)=0,
VLOOKUP($L4,PITCHERScompLIST,94,FALSE)=0),"",
VLOOKUP($L4,PITCHERScompLIST,93,FALSE))

what am I doing wrong here?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Is "PITCHERScompLIST" a defined Name Range? If it isn't, that's where your problem lies. You need to be referring to a range of cells.

The concept you're using works - I tested it using this formula:
=IF(AND(VLOOKUP(A1,A6:C7,2,FALSE)=0,VLOOKUP(A1,A6:C7,3,FALSE)=0),"",VLOOKUP(A1,A6:C7,2,FALSE))
 
Upvote 0
Yes, it is a named range... I realize now why I am still getting 0 back in some circumstances... stupid mistake by me. The AND function requires it to be true for both cases, and that's essentially what I need it to do, just going to have to live with a few 0's on occasion.

thanks for your help
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,850
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top