+ Reply to Thread
Results 1 to 6 of 6

Copy specific data from one workbook to another workbook if certain criteria

  1. #1
    Registered User
    Join Date
    03-31-2011
    Location
    Canada, Toronto
    MS-Off Ver
    Excel 2003
    Posts
    9

    Copy specific data from one workbook to another workbook if certain criteria

    I wonder if someone can help me out. I have a workbook called Codes that contains
    2 fields (channel name and channel codes). The worksheet name is Channel Codes

    I would like to copy specific data from this sheet to another
    worksheet (Airlines Data) based on specific criteria.

    Master Data Worksheet is setup as follows:

    Channel Names Channel Codes ....

    CN 2001
    BBC 2087
    CNN 2089

    I would like the macro to lookup the channel codes and copy the specific data
    for that cell over to the Airlines data workbook and then save
    this data.

    Thanks in advance for your help.

    I can use vlookup and countif function but i have to use a macro (in excel vba)

    Mark.
    Last edited by excelvb; 04-05-2011 at 03:35 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy specific data from one workbook to another workbook if certain criteria

    hi, Mark, it would be helpful to see the workbook and actually the criteria to select specific data

  3. #3
    Registered User
    Join Date
    03-31-2011
    Location
    Canada, Toronto
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Copy specific data from one workbook to another workbook if certain criteria

    Hi, I have uploaded the 2 files. Thanks in advance for your help !
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy specific data from one workbook to another workbook if certain criteria

    hi, please save and unzip attachment - folder with two files inside. Open "Airlines.xls" and press "Start" button.

    As soon as both files are in the same folder the code will work as expected.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-31-2011
    Location
    Canada, Toronto
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Copy specific data from one workbook to another workbook if certain criteria

    Wow !!! Thank you so much watersev ! I was looking for this all over google and you solved it in a minute ! Thanks again !!! Everything is working as expected !

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy specific data from one workbook to another workbook if certain criteria

    hi, excelvb, if you are happy with the outcome, please mark the thread as Solved under Forum rules:

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

+ 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