+ Reply to Thread
Results 1 to 2 of 2

VBA code to transfer data to another table

  1. #1
    Forum Contributor
    Join Date
    02-13-2022
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    110

    VBA code to transfer data to another table

    Hello helpers,

    please help me get some VBA code for the following:

    1. I have Table 1 and table 2.
    2. Data about products get entered in Table 1 and transfered to Table 2
    3. Products are numbered but there could be several products with the same number
    4. On selecting L3, I want the code to check if there are entries in Table 2 for the selected product. If there are, they should be populated in Table 1. Otherwise, new entries will be recorded in Table 1 which should be transfered to Table 2
    5. After transfering to Table 2, I want Table 1 cleared for the next entry
    6. If data already exist in Table 2 and then shown in Table 1 on selecting product number in L3, any updates to the existing entries should update Table 2 as well.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: VBA code to transfer data to another table

    I am not sure what you mean by "After transferring to Table 2, I want Table 1 cleared for the next entry."

    We are transferring FROM Table2 to Table1.

    As for updating items in Table 2 when an item with that number is changed in Table 1, that cannot be done due to ambiguous primary keys. For example if I update one of the item 3s in Table 1 which item 3 do I update in Table 2?

    Attached is as far as I could take it with the given instructions.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. [SOLVED] Transfer current row of data (Table) to a new row in a second table on the same sheet
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 11:12 PM
  2. Replies: 4
    Last Post: 01-18-2013, 10:49 PM
  3. Transfer data from one table to another
    By framie666 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2012, 10:10 PM
  4. [SOLVED] how to transfer data using code
    By bunjijumper in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2010, 01:15 AM
  5. Code for transfer data
    By tofimoon4 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-25-2009, 11:18 AM
  6. Transfer Data Into Table
    By sparky3883 in forum Excel General
    Replies: 1
    Last Post: 05-17-2007, 06:37 PM

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