Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lookup Macro
Hello, could some one please help me with the following?
I have two Excel 2003 workbooks. One workbook is named: Master.xls and the worksheet is also named: Master. The other workbook is named: Stock Numbers.xls and the worksheet is also named: Stock Numbers. In column A of both the Master worksheet and the Stock Numbers worksheet is a list of Part Numbers. The Part Numbers start from A2:A65000 in each worksheet. In column J of the Stock Numbers worksheet there is a list of stock codes. In column J of the Master worksheet is a blank list of Stock Codes that needs to be populated with all corresponding (part number / stock code) matches found in the Stock Codes worksheet. I wish to get Excel to lookup each Part Number in Column A of the Master worksheet and see if there is a corresponding Part Numbers in column A of the Stock Numbers worksheet. If there is a match, then the corresponding Stock Number against the matched part Number in the Stock Numbers worksheet needs to be populated in column J of the Master worksheet against the matched part number. Example: Master worksheet: Columns A & J: Cell: A2: 001P87 Cell J2: "blank cell" A3: A28H96 Cell J3: "blank Cell" A4: X8500L cell J4: "blank cell" Stock Code worksheet: Columns A & J: Cell: A2: 001P87 Cell J2: 018519937 A3: BR54M Cell J3: 000012255 A4: X8500L Cell J4: 668510039 So, in the above example, when Excel looks up Column A of the Master worksheet, the part numbers: 001P87 & X8500L will find a corresponding match to those part numbers located in Column A of the Stock Codes worksheet. Thus, the stock codes in Column J of the Stock Codes worksheet need to be copied in to the corresponding blank cells in Column J of the Master worksheet. Then the worksheets should look like this after the stock codes have been copied across: Master worksheet: Columns A & J: Cell: A2: 001P87 Cell J2: 018519937 A3: A28H96 Cell J3: "blank Cell" A4: X8500L cell J4: 668510039 Stock Code worksheet: Column A & J: Cell: A2: 001P87 Cell J2: 018519937 A3: BR54M Cell J3: 000012255 A4: X8500L Cell J4: 668510039 If any one can help with creating a macro, it would be greatly appreciated. Thanks, Chris. *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro Lookup | Excel Worksheet Functions | |||
Run Lookup only once - Macro | Excel Discussion (Misc queries) | |||
lookup macro | Excel Discussion (Misc queries) | |||
Is it possible...lookup macro | Excel Programming | |||
Macro lookup | Excel Discussion (Misc queries) |