LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro Lookup DamienO Excel Worksheet Functions 3 October 23rd 09 09:44 AM
Run Lookup only once - Macro RachuChavan Excel Discussion (Misc queries) 1 June 12th 09 09:53 AM
lookup macro BMI Excel Discussion (Misc queries) 0 February 18th 08 03:10 PM
Is it possible...lookup macro Haxer Excel Programming 5 August 4th 07 08:50 AM
Macro lookup dudemango Excel Discussion (Misc queries) 6 February 6th 06 09:20 PM


All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"