I have 2 WB's that are currently linked with the following VLOOKUP formulas.
=IF(E28>0,IFERROR(VLOOKUP(E28,'O:\Manufacture\Procurement Item Master\[ITEM MASTER.xls]DATABASE'!$A$1:$G$950,2,0),"Item Not in Item Master. Enter a Description"),"")
=IF(E28>0,IFERROR(VLOOKUP(E28,'O:\Manufacture\Procurement Item Master\[ITEM MASTER.xls]DATABASE'!$A$1:$G$950,3,0),"Enter the Manufacture"),"")
=IF(E28>0,IFERROR(VLOOKUP(E28,'O:\Manufacture\Procurement Item Master\[ITEM MASTER.xls]DATABASE'!$A$1:$G$950,4,0),""),"")
=IF(E28>0,IF(G28<>"Customer",IFERROR(VLOOKUP(E28,'O:\Manufacture\Procurement Item Master\[ITEM MASTER.xls]DATABASE'!$A$1:$G$950,5,0),"Add Cost"),0),0)
I have successfully written the following code to handle the VLOOKUP, from the second WB and populate all of the correct fields. However the IF statement that is commented out will only work when the lookup happens in the same workbook
Note I tested the code first to lookup in the same sheet, once I got that working I moved to do it from a different sheet in the same WB, once I got that to work I moved to looking up the data in the other workbook which is how the system currently works. I have attached samples of the files for reference.
![]()
Please Login or Register to view this content.
The problems I am having are:
1. I need to check if the Part number field is empty, if so I need to skip to the next part number. Currently the VLOOKUP returns #N/A if the Part number is blank or not found. I tried IF cl = "" Then goto Next cl but could not figure out how to get it to work
2. If a the value = #N/A after a lookup, I would like it to display nicer text such as the formulas above. i.e please enter the description, manufacture, cost, etc. This only works when I use the code above on the same workbook. I Don't UNDERSTAND WHY. Still a NOOB.
3. I need to check if the description, supplier, manufacture and cost fields contain data, if they do I don't want to overwrite it. The user may end up running the check after they have entered data into the fields manually. If new parts get added to the Part number list, they should be able to run the check only on the part numbers that do not have the adjacent fields completed already.
3. I need to be able to look at the Provided by column and see if it says "Customer", if it does I need the Cost column to display a zero dollar amount
Any help will be greatly appreciated.
Bookmarks