+ Reply to Thread
Results 1 to 1 of 1

Combining 2 different macro into 1

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    SG
    MS-Off Ver
    Excel 2007
    Posts
    37

    Combining 2 different macro into 1

    Hello,

    I've 2 macros, "FirstUpdat" and "Update" for updating training data into my database.

    The "FirstUpdate" searches for the employee's name (Update sheet) in Database sheet and copy & paste training data into the adj cells of the searched name.
    The "Update" searches for the employee's name (Update sheet) in Database sheet, insert 1 row below the searched employee's name, copy down all the employee's background data (e.g. department, designation, employee code ...), then copy & paste the training data into the adj cells of the copied down data.

    As you can see, both of the macro functions for 2 different conditions, 1. When employee doesn't have existing training data at all; 2. When employee has existing training data.

    I think that this method is quite tedious as I've to know which employee doesn't have any existing training data and which employee already has existing training data. Therefore, I'm wondering if I could have a way to combine both of these macros so that I'll only have 1 macro that functions like:
    1. If the employee doesn't have existing training data, insert the new training data into the same row as current employee name;
    2. If the employee has existing training data, insert the new training data into a row below the existing employee name and copy down all the employee's background data (this is because the "SearchEngine" macro will need all these data to be present before I can use them for query)

    I've tried asking this question in my previous posts but there isn't any reply so I guess either it couldn't be done or people aren't clear with what I wanted. Therefore, I've separated the intended macro into 2 and hoping that there will be answers this time round. Please advise. Thanks.



    kayoke
    Attached Files Attached Files

+ 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