+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Automatically insert a row when cells below are filled.

  1. #1
    Registered User
    Join Date
    11-07-2011
    Location
    Texas, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Question Automatically insert a row when cells below are filled.

    Hello everyone. I am a novice Excel user - I know nothing about macros or VBA. I have a log for keeping track of company document changes. These are text entries so there are no formulas in this log. As the first cell is populated, I need a blank row to automatically appear above it so the entries are in descending chronological order. Is it possible to have Excel do this? I have attached the log to clarify my question.
    Thank you so much!

    Attached Files Attached Files
    Last edited by garridosk; 11-16-2011 at 03:27 PM. Reason: solved

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Automatically insert a row when cells below are filled.

    This code will shift the row down once you fill in the effective date cell in G3. This code needs to be added to the DCO Log Blank sheet's code page.

    Please Login or Register  to view this content.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    11-07-2011
    Location
    Texas, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Talking Re: Automatically insert a row when cells below are filled.

    Thanks Dave!

    Wow, I've never worked with code before. It worked perfectly! Do you know of an easy reference book that I can buy to do other things with code?

    Thanks again, Sandra
    Last edited by garridosk; 11-08-2011 at 02:26 PM. Reason: error

  4. #4
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Automatically insert a row when cells below are filled.

    Hold down Alt and press F11 to bring up the VBE. On the left you will see a pane titled Project - VBAProject. Under Microsoft Excel Objects, double click Sheet2 (DCO Log Blank) This will bring up Sheet2's code page, which should be empty. Paste the following code in it:

    Please Login or Register  to view this content.
    Close the VBE. You will have to save your workbook as a .xlsm file instead of a .xlsx.

  5. #5
    Registered User
    Join Date
    11-07-2011
    Location
    Texas, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Automatically insert a row when cells below are filled.

    When I try to save, the options are not identified by extensions, just descriptive titles:

    Excel Workbook
    Macro-Enabled Workbook
    Binary Workbook
    Other Formats

    Is *.xlsm one of these?

    Thanks,
    Sandra

  6. #6
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Automatically insert a row when cells below are filled.

    Yes, it is Macro Enabled Workbook

  7. #7
    Registered User
    Join Date
    11-07-2011
    Location
    Texas, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Unhappy Re: Automatically insert a row when cells below are filled.

    Great, thanks so much!

    Update: Help! See post above (#7).
    Last edited by garridosk; 11-09-2011 at 01:02 PM. Reason: Problem

  8. #8
    Registered User
    Join Date
    11-07-2011
    Location
    Texas, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Automatically insert a row when cells below are filled.

    I'm not sure what happened to my workbook. I saved it as an xlsm file yesterday. I opened it this morning and it doesn't work. The code was not there anymore. I added it again but it's still not working. Any suggestions?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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