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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,054
Messages
6,122,897
Members
449,097
Latest member
dbomb1414

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