+ Reply to Thread
Results 1 to 4 of 4

Macro to match and populate field

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    9

    Macro to match and populate field

    I am looking to read a column on a worksheet check to see if any of those strings match the values in another column. If they do I want to copy a price over. I am using this to compare 2 BOM's with part costs and I would like to have the prices copy over so I do not have to look each one up if it was already priced in an existing BOM.

    Columns are as follows

    QTY-PART NUMBER-DESCRIPTION-COST

    I have 2 workbooks. OLD BOARD and NEW BOARD

    I want to look at the part numbers in NEW see if they exist in OLD and if they do copy the cost value from OLD to NEW.

    I think I am explaining it right.
    Last edited by ounvme; 11-28-2012 at 10:11 AM. Reason: typo

  2. #2
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Macro to match and populate field

    Hi - Assuming your data in OLD BOARD is in columns A and B, use the below in NEW BOARD sheet cell B2 and below:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If this is not helpful, please upload a sample workbook...

    Thanks.
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  3. #3
    Registered User
    Join Date
    10-01-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macro to match and populate field

    Here are 2 sample sheets. Hope this helps.

    I also need the data retained if the OLD_BOM is deleted.
    Attached Files Attached Files
    Last edited by ounvme; 11-28-2012 at 10:13 AM.

  4. #4
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Macro to match and populate field

    Try this in E2 and below cells:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Part Number S20500-17 will show NA because this is not there in in OLD_BOM workbook.

    Regarding your second point of retaining data when OLD_BOM is deleted, you can achieve this by pasting column E as values (just copy entire column and Press ALT + E + S + V Enter) or just break links (Press ALT + E + K, select Break Links). This will leave the value of the formula results as is and will stay even if you delete / move OLD_BOM workbook.

    Hope this helps.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1