+ Reply to Thread
Results 1 to 3 of 3

Macro: Automatic copy data from another sheet with condition checking date

  1. #1
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Macro: Automatic copy data from another sheet with condition checking date

    I want to make macro (or VBA) for automatic copy data, and I'm new in this (just start to learn).

    Here the data that i have:
    sheet : List Cust
    Cust Entry Date Term
    A 01-01-12 4
    B 01-01-12 3
    A 04-01-12 5
    C 02-01-12 7
    D 08-01-12 6

    sheet : transaction
    Cust Trans Date Term
    A 02-01-12 4
    B 03-01-12 3
    A 05-01-12 5

    As you see, in sheet transaction, field term are from sheet 'list cust' with condition If Cust = 'A' and Max(Entry Date) <= Trans Date then copy the term to sheet transaction, so far i used formula like this :
    Please Login or Register  to view this content.
    Thanks in advance
    SDCh
    Last edited by SDCh; 02-07-2013 at 08:37 AM. Reason: change Column Name on sheet Transaction

  2. #2
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: Macro: Automatic copy data from another sheet with condition checking date

    I'll try to record macro and this the result:
    Please Login or Register  to view this content.
    Can someone help me, so I can run this code on VBA automatically, because i got error message "Run-time error '1400': Application-defined or object-defined error"

    And if can, I want the looping using "For Next".


    Thanks in advance
    SDCh
    Last edited by SDCh; 02-08-2013 at 02:58 AM. Reason: add "...'For Next'

  3. #3
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: Macro: Automatic copy data from another sheet with condition checking date

    Sorry, I forgot to attach file. Please help me how to make macro for this, because I not want my coworker accidentally change the formula that already I made

    Example Transaction.xlsx

    Regards,
    SDCh

+ 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