+ Reply to Thread
Results 1 to 2 of 2

Add a new row in two tables at once on the second to the last row (on separate tabs)

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    Denver, CO
    MS-Off Ver
    2007
    Posts
    3

    Add a new row in two tables at once on the second to the last row (on separate tabs)

    Hi guys!

    Alright... I am running around trying to find a way to work this, and I'm not very good with macros yet.

    I have a sheet that summarizes about 15 other sheets, but I need to make a button that will allow the user to create a row to enter in new data in one of the other 15 sheets. I have two issues I'm trying to solve:
    1) create a new row on the row above the last row of the table (the last row will be used to sum up the numbers above it
    2) When the user creates a new row in the one sheet, to make it also create a new row in the summary sheet.

    Below is what I got so far for the macro button, but I don't know enough about macros to get it to work for what I need it for. If anyone could help I would greatly appreciate it.


    Private Sub CommandButton1_Click()

    Dim the_sheet As Worksheet
    Dim table_list_object As ListObject
    Dim table_object_row As ListRow
    Set the_sheet = Sheets("General Conditions")
    Set table_list_object = the_sheet.ListObjects(1)
    Set table_object_row = table_list_object.ListRows.Add

    table_object_row.Range(-2, 1).Value = "New Item"
    last_row_with_data = the_sheet.Range("A" & Rows.Count).End(xlUp).Row

    the_sheet.Range("B" & last_row_with_data) = "Title Name"
    the_sheet.Range("C" & last_row_with_data) = "Ref Number"

    End Sub
    Last edited by jbenk; 11-26-2015 at 09:51 AM.

  2. #2
    Registered User
    Join Date
    09-10-2014
    Location
    Denver, CO
    MS-Off Ver
    2007
    Posts
    3

    Re: Add a new row in two tables at once on the second to the last row (on separate tabs)

    Here is the file I'm working on.
    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)

Similar Threads

  1. [SOLVED] Macro needed to Concatenate data in 2 separate tables of 2 separate sheets
    By 823 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-08-2015, 02:02 PM
  2. Moving multiple excel tabs into separate tabs/separate files
    By RO24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-02-2014, 11:04 AM
  3. [SOLVED] LOOKUP help for data in separate tabs
    By NFLexcel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-07-2014, 02:22 AM
  4. Pivot Tables - need to do separate pivot tables for multiple sheets in same format
    By tconnell1965 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2013, 07:04 AM
  5. Separate Categories into Tabs
    By nicholasoh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2011, 02:20 AM
  6. Obtaining Data from Separate Tabs
    By squidg in forum Excel General
    Replies: 6
    Last Post: 03-09-2011, 05:59 PM
  7. Separate tabs from a spreadsheet
    By ukphoenix in forum Excel General
    Replies: 2
    Last Post: 11-30-2009, 02:35 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