+ Reply to Thread
Results 1 to 7 of 7

Add a Row under a table when the table expands.

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    U.K
    MS-Off Ver
    Excel 2016
    Posts
    101

    Add a Row under a table when the table expands.

    HI,
    I need some help with VBA. I have a number of tables separated by a blank ROW.

    Capture.PNG

    As data is added to the tables they expend down to fill the empty row. When this happens i need a new row to be inserted under that table allowing the table to expand again the next time i add more data to that table.

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Add a Row under a table when the table expands.

    The default way table expand works is that the blankrow is not filled but the other tables and data is pushed down
    That is if the picture shows true excel tables and not just formatted cells.
    You do not need VBA for that to happen

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    U.K
    MS-Off Ver
    Excel 2016
    Posts
    101

    Re: Add a Row under a table when the table expands.

    Thank you for the reply, however when a table expands it fill the blank row and doesn't push the other tables down.

  4. #4
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Add a Row under a table when the table expands.

    Post an example of your file (an excel file not a picture) then because by default it does. It is impossible to guess from a picture why it is not working for you

  5. #5
    Forum Contributor
    Join Date
    06-25-2012
    Location
    U.K
    MS-Off Ver
    Excel 2016
    Posts
    101

    Re: Add a Row under a table when the table expands.

    Sorry for the delay had PC issues. Here is an example. Try adding a date in the first table and you will see that the table expands as it should but a new row is not inserted underneath.
    Attached Files Attached Files

  6. #6
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Add a Row under a table when the table expands.

    YesI see what you mean, while I was answering I was thinking about what the trick or the setting was. as I remembered later having problems with it in the past.
    There is no setting for this to force this behavior. You need a little excel-magic to make it work I have applied it in your example.

    To keep a blank row between your table you have to put some text in the cell below the table* and then make the text the same color as the spacing row (most likely white)
    When there is data below a table the table expand function will push that data down when you insert a new row.

    Have a look at the attachment I created 2 extra tables that will auto expand and push down other tables as well.
    A small trick instead of a setting


    *if the table auto expands on you simple press CTRL+Z or undo button once to undo the expand, or use the resize grip of the table
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    06-25-2012
    Location
    U.K
    MS-Off Ver
    Excel 2016
    Posts
    101

    Re: Add a Row under a table when the table expands.

    Thanks again for your help however with regards to your example, yes the table does expand to include any new data, but a new Row between the tables is still not being inserted.

+ 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. How to change a number to increase in size as the table expands
    By LinaL in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-04-2018, 04:40 PM
  2. How to change a number to increase in size as the table expands
    By LinaL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-02-2018, 09:47 AM
  3. Replies: 1
    Last Post: 03-25-2018, 04:16 PM
  4. Duplicate formula in rows as pivot table expands
    By vrinner in forum Excel General
    Replies: 1
    Last Post: 02-05-2018, 03:50 PM
  5. Formulas not added as table expands
    By mjcarman01 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-27-2017, 02:27 PM
  6. Crosstab table to pivot table to plain table exceeds Excel row limit
    By jjsilva in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-30-2017, 11:43 PM
  7. Macro to fill 1st table with info from 2nd table. 2nd table search with 2 conditions
    By Ribeiro.JD in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-17-2016, 02:03 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