+ Reply to Thread
Results 1 to 3 of 3

Copy range to next empty row in a table on another sheet with VBA

  1. #1
    Registered User
    Join Date
    07-04-2014
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    2

    Copy range to next empty row in a table on another sheet with VBA

    Hello everyone,

    Firstly, I would like to thank everyone participating in this forum for their great input, I have really learned a lot from you all!


    I am currently looking to set up an order sheet that saves all past orders to a table, which can be seen in my attached workbook.


    My goal is for all cells with data in range "OrderRange" (A10:G36) on the "Order Form" sheet to be copied to the next empty row on the "PastOrders" table in "Order History" sheet. I would like this to be triggered everytime the user clicks the black "Place Order" button up top.

    So far, I have been succesful in being able to copy "OrderRange" to "PastOrders", but I still have two main issues:

    1. I would like for empty/blank cell rows to be skipped so that there aren't any empty row in the "PastOrders" table.

    2. As of right now, clicking the "Place Order" button only causes for the data in the "Past Orders" table to be overwritten, I would like for the data to be copied underneath on the next open row with each click.


    I would really appreciate it, if someone could help shed some light on where my VBA code is falling short.


    I thank you in advance!!!
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Copy range to next empty row in a table on another sheet with VBA

    try this modified macro:
    Please Login or Register  to view this content.
    In the "Order History", be sure to have something in cell A2 for your first run because it may create an empty row.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    07-04-2014
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    2

    Re: Copy range to next empty row in a table on another sheet with VBA

    Hello p24leclerc,

    I apologize for not being able to write you sooner. I decided to take the later/better part of last month off for Holiday =)

    I was however able to get around to plugging your updated macro, and everything worked exactly how I had hoped!

    Thank you very much for your help, I greatly appreciate it!

+ 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] copy range and paste values only to another sheet in next empty row
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2015, 05:08 AM
  2. Copy Range from Sheet A then find the next empty row in sheet B
    By clowesr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-02-2014, 05:42 PM
  3. [SOLVED] Macro to Copy Range and Paste in the Empty Row Same Sheet
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-22-2013, 11:01 AM
  4. Replies: 1
    Last Post: 04-22-2013, 10:34 AM
  5. Copy data from one sheet to another in the first empty column in a given range
    By timisoara in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-16-2013, 10:53 AM

Tags for this Thread

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