+ Reply to Thread
Results 1 to 3 of 3

macro for copying data in specific order

  1. #1
    Registered User
    Join Date
    01-20-2021
    Location
    Bishkek
    MS-Off Ver
    Microsoft 365
    Posts
    3

    macro for copying data in specific order

    Hello,
    I have almost "0" experience in VBA. I would be thankful for anyone who can help me create a macro for:
    There are two sheets in a workbook, both sheets have same two columns (A & B) which are part number (PN) and serial number (SN), but order of PN & SN are different on two sheets.
    Macro is required to compare columns A & B on two sheets, if there equal (A&B from sheet1 = A&B from sheet2) then copy data from column C - "prices" from sheet1 to sheet2.
    Data needs to be copied in order of A&B columns from sheet2.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: macro for copying data in specific order


    Hi,

    without any attachment it seems you even just need some VLOOKUP formula rather than any VBA procedure …

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,336

    Re: macro for copying data in specific order

    As no sample file...This will give you an idea...
    Please Login or Register  to view this content.
    OR as per MarcL suggestion...A simple formula should suffice...
    Using attached file...In Sheet2 C2 formula and copy down...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Confirmed with Ctrl+Shift+Enter
    Attached Files Attached Files
    Last edited by sintek; 05-22-2021 at 07:24 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If-Then copying specific data from Table1 to Table2 in a specific order
    By b4tmast in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2016, 04:28 AM
  2. macro for copying specific data
    By somusas in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-23-2015, 02:20 AM
  3. Replies: 0
    Last Post: 06-19-2014, 07:11 AM
  4. Need help with specific macro script for data copying in a specific format
    By Amit1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2014, 12:36 AM
  5. Copying specific data to a specific field in a worksheet macro
    By bradpeh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2013, 01:52 AM
  6. Macro for Copying Specific data from a table to a new Row
    By RuinousOmen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2013, 01:17 AM
  7. Macro Help - copying specific data
    By Dave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2005, 03:06 AM

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