+ Reply to Thread
Results 1 to 6 of 6

Automatically add multiple new rows when data is entered into the sheet.

  1. #1
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Automatically add multiple new rows when data is entered into the sheet.

    Hi Guys,

    The thing I am wanting to do is much easier to explain with an example, please download the attachment and have a look.

    I want there to ALWAYS be 5 FREE/EMPTY rows to be able to enter data into them
    I also want the black area around the outside to ALWAYS be a further 15 rows in height below that.

    Sheet 1 = Simple Example
    Sheet 2 = A much larger example
    Sheet 3 = Erroneously added data should still extend the sheet by 5 rows each time.

    Thanks in advance
    - Ryan
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Automatically add multiple new rows when data is entered into the sheet.

    Put into sheet1 code:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Automatically add multiple new rows when data is entered into the sheet.

    Hi stnkynts,

    I tried that code and it looks pretty awesome. I've come across a few errors when testing it and the only one I can't fix is the formulas part:

    Formula in N and O aren't dragged down, however, the last used cell in that column MAY not have a formula it could be one a few rows above, it needs to find the last used formula and drag it down but it MUST skip over any cells that have a value in them.

    Please Login or Register  to view this content.
    I love how smoothly it adds the new rows, it looks beautiful!


    EDIT: I made a bunch of changes and I've got to the following:

    Please Login or Register  to view this content.
    I have to put a copy of the formula into the first black row of the border, it's the best way I've found... anyone got any suggestions?
    Last edited by Hyflex; 08-19-2014 at 12:53 AM.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Automatically add multiple new rows when data is entered into the sheet.

    Assuming you maintain your formula in column N & O of the first black row

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Automatically add multiple new rows when data is entered into the sheet.

    Hi stnkynts,

    Running that code is hitting the same problem that I was hitting when I first modified your code, if you click in A15 and put a random character, N15:O16 aren't given the right formula. See http://i.imgur.com/7scLVrX.png

  6. #6
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Automatically add multiple new rows when data is entered into the sheet.

    I fixed the majority of it in the following code, the best way I've found but someone else might be able to still improve this...

    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: 2
    Last Post: 05-02-2013, 08:01 PM
  2. Automatically add rows and copy formulas when data entered
    By alina_t in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2011, 02:30 PM
  3. Replies: 3
    Last Post: 04-01-2010, 07:49 PM
  4. automatically show data entered on another sheet within the workbo
    By leah in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-24-2006, 09:55 AM
  5. can entered data in sheet 1 be automatically pasted in sheet 2
    By Adnan Jahangir in forum Excel General
    Replies: 1
    Last Post: 02-23-2006, 06:10 AM

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