+ Reply to Thread
Results 1 to 5 of 5

Add data to the next available row in an Excel table

  1. #1
    Registered User
    Join Date
    03-11-2020
    Location
    Vancouver
    MS-Off Ver
    Office 365
    Posts
    3

    Add data to the next available row in an Excel table

    Hi there,

    I am looking to add data from one sheet to another using vba code.

    Here's what I have so far:

    Please Login or Register  to view this content.
    This code works to add code to the end of an excel table but how can I add this data to the next available row?

    Any help would be gratly appreciated!
    Last edited by Pepe Le Mokko; 03-11-2020 at 01:26 PM. Reason: Code tags

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,462

    Re: I want to add data to the next available row in an excel table

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: I want to add data to the next available row in an excel table

    Quote Originally Posted by SukeL View Post

    This code works to add code to the end of an excel table but how can I add this data to the next available row?
    Do you mean the table may have empty rows, and you want to fill the next available empty row?

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    03-11-2020
    Location
    Vancouver
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Add data to the next available row in an Excel table

    If I wanted to advance this code so that once the data is entered in the table in the worksheet "Database", I could extract some data that automatically flows in as a result of this data being entered into the table frmFileListDS in the "Database" worksheet.

    The automatic data is populated in column G and H and I would like this to be transferred back into worksheet "Correspondence Log" in columns B and C respectively.


    The data should be transferred in from cell B5 and C5 but I would also like it to find the next available row if there's is data already populated, similar to the set up for the original code.



    I have made some attempts but I am struggling with the logic.


    Any help would be greatly appreciated!

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Add data to the next available row in an Excel table

    You're welcome I guess? I'll just assume the first code worked.

    This will copy the "automatically flows in" values from columns G and H of the table Row where data was entered and then pastes to the next empty row of the Correspondence Log columns B and C.

    Please Login or Register  to view this content.

+ 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: 09-08-2017, 07:30 AM
  2. Hardcopy list generated by Excel's Data Table, refresh table and repeat
    By Ronnet2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-27-2015, 06:24 AM
  3. Replies: 0
    Last Post: 11-06-2014, 07:25 PM
  4. Replies: 3
    Last Post: 01-07-2014, 06:13 AM
  5. Replies: 2
    Last Post: 06-16-2013, 02:58 PM
  6. Export Excel data into Access table - overwrite table data
    By Jonsocks in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-08-2012, 12:05 PM
  7. import data from access table to excel pivot table - Enable Auto Refresh
    By okl in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-01-2010, 09:38 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