![]() |
more if statements and vlookups
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)))) |
more if statements and vlookups
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 -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "AmyLRuck" wrote in message ... 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)))) |
more if statements and vlookups
try this idea instead.
=vlookup(b14,yourlookuprng,if(e7="r",7,4),false) -- Don Guillett Microsoft MVP Excel SalesAid Software "AmyLRuck" wrote in message ... 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)))) |
All times are GMT +1. The time now is 12:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com