Adding in an 'IF' to existing formula

  • Thread starter Thread starter Jim
  • Start date Start date
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?
 
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 -----
 
Back
Top