View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sharad Sharad is offline
external usenet poster
 
Posts: 123
Default Macro Needed To Find Product Cost In Another Sheet

Helo,

you can use vlookup function.

like
= VLOOKUP(A1,[xyz-workbook.xls]SheetName $A$1:$B1000,colnumber,FALSE)

Where A1 is the product code is sell worksheet.
xyz-workbook.xls is the workbook where product cost is stored.
SheetName is the name of the sheet which actually contains the product
cost.
$A$1:$B1000 is the range where the product number and prodcut costs are
actually stored in the sheet 'SheetName'.
colnumber is an integer refering to the column where the costs is stored
(e.g. if it is column B you replace 'colnumber' with '2')

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!