+ Reply to Thread
Results 1 to 2 of 2

Auto add rows

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    Norfolk, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Auto add rows

    I'm building a list of questions and these questions are compiled under about 10 different categories. what i am trying to do is have this list be adaptable so that if i want to add more questions in a catagory the catagory expands and adds a blank space below the last question in the category.
    i also want to have each category on a separate sheet which adjusts when I work on the master sheet
    example.xlsx
    i attached an example sheet. not the whole thing just a few categories to see my structure.

    thanks

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Auto add rows

    Hello there,

    Attached is a workbook I believe accomplishes what you are trying to achieve.

    To run the macro, enable macros and then press Ctrl+w on your keyboard.

    To insert the code into your workbook

    1.Press Alt+F8 on your keyboard
    2.Clear the macro name box and type CreateWorksheets in the blank box provided
    3.Select the Create option
    4.In between the Sub CreateWorksheets() and End Sub copy and paste the below code:

    Please Login or Register  to view this content.
    Below the End Sub copy and paste the below code:

    Please Login or Register  to view this content.
    Anything that appears in green is a comment I left to help you understand the code.

    5.Exit out of the Visual Basic Window
    6.Press Alt+F8 again and this time select the CreateWorksheets macro
    7.Select Run
    8. To assign the Ctrl+w to the macro, press Alt+F8 and select the CreateWorksheets macro
    then select Option. In the space provided assign a shortcut key.

    Let me know how these work for you!
    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)

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