Adding in an 'IF' to existing formula

J

Jim

I'm having trouble grouping a couple of formulas together, could anyone
please advise? Thanks

Originally i had
IF(B$7="","",VLOOKUP(B$7,'SHOP1'!B:AC,6,FALSE))
which returned the desired result
but now i am trying to add in a factor that only pulls that result through
if R7=Apples. I have the below formula but that is still pulling through the
value from column 6 even though R7 does not=Apples?

IF(B$7="",(IF(R$7="APPLES","","")),VLOOKUP(B$7,'SHOP1'!B:AC,6,FALSE))

Can anyone point out where I am falling down with this one?
 
J

Joe User

Jim said:
but now i am trying to add in a factor that only
pulls that result through if R7=Apples. [....]
IF(B$7="",(IF(R$7="APPLES","","")),VLOOKUP(B$7,'SHOP1'!B:AC,6,FALSE))

Based on your English description, I think you want:

=IF(OR(B$7="", R$7<>"APPLES"), "",
VLOOKUP(B$7,'SHOP1'!B:AC,6,FALSE))


----- original message -----
 

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