more if statements and vlookups

  • Thread starter Thread starter AmyLRuck
  • Start date Start date
A

AmyLRuck

I am trying to reference another worksheet with a retail value and a
wholesale value based on a value entered on the purchase sheet (r for retail
and w for wholesale). This is what I have entered and it isn't working.

=IF(E7="R",(VLOOKUP('b14,Pet Store
Database'!$A$8:$G$75,7,FALSE)),IF(E7="W",(VLOOKUP('b14,Pet Store
Database'!$A$8:$D$75,4,FALSE))))
 
It looks like you have an apostrophe (single quote) in the wrong place
The VLOOKUP part needs to be
VLOOKUP(B14,'Pet Store Database'!$A$8:$G$75,7,FALSE)

We could get rid of some unneeded parentheses
=IF(E7="R",VLOOKUP(B14,'Pet Store Database'!$A$8:$G$75,7,FALSE),
IF(E7="W",VLOOKUP(B14,'Pet Store Database'!$A$8:$D$75,4,FALSE)))

best wishes
 
Back
Top