if statement with vlookup
if range(vlookup(a1,[data.xls]inventory!$K$2:$L$1000,2,0).value = "accessory"
then application.run "macro1" else application.run "macro2" i know my error is in in the equation just cant figure it out thanks in advance |
if statement with vlookup
Without testing, try (the 1st two lines here are ONE line)
if application.vlookup(range("a1"),workbook("data.xls "). _ sheets("inventory").range($K$2:$L$1000),2,0) = "accessory" then macro1 else macro2 end if Many usually define a name and then just if vlookup([a1],definednamerange,etc -- Don Guillett SalesAid Software "choice" wrote in message ... i know my error is in in the equation just cant figure it out thanks in advance |
All times are GMT +1. The time now is 06:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com