+ Reply to Thread
Results 1 to 12 of 12

Copy and paste values of a table into another table

  1. #1
    Registered User
    Join Date
    04-28-2021
    Location
    Clanfield
    MS-Off Ver
    Microsoft 365
    Posts
    52

    Copy and paste values of a table into another table

    I have another question regarding VBA code for Coping and Pasting Table Values into a different Table, as per attached example. I have Internal reservation Table called "InternalOrders" that is populated by Users using UserForm. I want to create a macro for my CommandButton to Copy and Paste values from "OrdersBySupplier" table into next available row of "OrderedStock" table in "OrderedStock" tab.

    Any help would be much appreciated
    Attached Files Attached Files

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: Copy and paste values of a table into another table

    where is the data for 'code #" and 'Requester' coming from ?

  3. #3
    Registered User
    Join Date
    04-28-2021
    Location
    Clanfield
    MS-Off Ver
    Microsoft 365
    Posts
    52

    Re: Copy and paste values of a table into another table

    Table "InternalOrder" is a s source data that comes from Userform that I have not included in this sample spreadsheet. Cell L1 in Reservation sheet is a selection of the supplier that then feeds into the "OrdersBySupplier". And I want to copy values from "OrdersBySupplier" table into new tab into "OrderedStock" table by using CommandButton in "Reservation" tab

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: Copy and paste values of a table into another table

    Sorry, only had one cup of coffee this morning, my one aged brain cell is now engaged, the sheet was only partly on view from column C

  5. #5
    Registered User
    Join Date
    04-28-2021
    Location
    Clanfield
    MS-Off Ver
    Microsoft 365
    Posts
    52

    Re: Copy and paste values of a table into another table

    Quote Originally Posted by torachan View Post
    Sorry, only had one cup of coffee this morning, my one aged brain cell is now engaged, the sheet was only partly on view from column C
    :-) I know the feeling.... My Project wakes me up in a middle of the nights as I come up with new ideas all the time lol

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

    Re: Copy and paste values of a table into another table

    and I want to copy values from "OrdersBySupplier" table into new tab into "OrderedStock" table
    Please Login or Register  to view this content.
    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!!!

  7. #7
    Registered User
    Join Date
    04-28-2021
    Location
    Clanfield
    MS-Off Ver
    Microsoft 365
    Posts
    52

    Re: Copy and paste values of a table into another table

    Quote Originally Posted by sintek View Post
    Please Login or Register  to view this content.
    wow! simple as that! You're amazing.... Thank you so much... again

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: Copy and paste values of a table into another table

    Good morning, have i read your requirement wrongly.
    From your illustration on your sample sheets I was under the impression that table "OrderedStock" was to be filtered from table "InternalOrders".
    The result @sintek does not appear to match the illustration on sheet "OrderedStock"
    torachan

  9. #9
    Registered User
    Join Date
    04-28-2021
    Location
    Clanfield
    MS-Off Ver
    Microsoft 365
    Posts
    52

    Re: Copy and paste values of a table into another table

    Quote Originally Posted by torachan View Post
    Good morning, have i read your requirement wrongly.
    From your illustration on your sample sheets I was under the impression that table "OrderedStock" was to be filtered from table "InternalOrders".
    The result @sintek does not appear to match the illustration on sheet "OrderedStock"
    torachan
    no, no no, all works perfect! I am just applying your code to my project with small additions of deleting empty rows. But it works Perfectly Good for my project! You're a star!

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

    Re: Copy and paste values of a table into another table

    My understanding...
    Copy databodyrange of "OrdersBySuppliers" Table to "OrderStock" Table on OrderSheet

  11. #11
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: Copy and paste values of a table into another table

    now suitably doubly confused
    what is the purpose of the 'status' column in table 'InternalOrders' that clearly comes over in your illustrated table 'OrderedStock'
    torachan

  12. #12
    Registered User
    Join Date
    04-28-2021
    Location
    Clanfield
    MS-Off Ver
    Microsoft 365
    Posts
    52

    Re: Copy and paste values of a table into another table

    Quote Originally Posted by torachan View Post
    now suitably doubly confused
    what is the purpose of the 'status' column in table 'InternalOrders' that clearly comes over in your illustrated table 'OrderedStock'
    torachan
    So the process is that Users will order a stock by using a User Form and it will be marked as an "ordered internally" first in the "InternalOrders" table. Twice a week, Stock Management team will be placing an order with suppliers taking everyone's orders from "InternalOrders" table and these items will be listed in "OrderedStock" table. That's where i needed a code for transferring items that have been ordered with a supplier via "OrdersForSupplier" table to "OrderedStock" table. At this point each item that has been ordered with a supplier will have a status of "Ordered with a supplier" instead of "Ordered internally". Finally, once ordered items will be delivered to the warehouse, the status will be changed to "Received at Warehouse" (Warehouse will notify Stock Management Team about received items using agreed form). So it is 3-stage process: Order internally, Order with a supplier and Received at Warehouse

    Does it make sense now?

+ 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. Replies: 1
    Last Post: 05-11-2021, 04:58 PM
  2. Copy paste from one table to other basing on unique values
    By cosiek in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-24-2020, 03:12 PM
  3. [SOLVED] Macro to copy range and paste values to first empty row of table
    By Grizraz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-19-2019, 02:07 AM
  4. Copy cell values, add a new row on table and paste them at the bottom of a table
    By ApexDmac in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2019, 11:00 AM
  5. [SOLVED] VBA copy rows in table containing values in list, paste in another worksheet
    By wannabeexcelguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2015, 07:29 PM
  6. [SOLVED] Copy Column in pivot table and paste values
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2014, 09:32 AM
  7. How-to Copy and Paste Values from list into Pivot Table filter
    By MacroNerd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2013, 06:26 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