+ Reply to Thread
Results 1 to 4 of 4

Insert rows/create tables based on user input?

  1. #1
    Registered User
    Join Date
    12-28-2016
    Location
    St. Petersburg, FL
    MS-Off Ver
    Office365
    Posts
    17

    Question Insert rows/create tables based on user input?

    I am creating a bid worksheet for my company. For certain jobs, we require more crews on site than we do for other jobs, so our number of crews needed changes per job. How can I input a crew cost table based on the number of crews needed for the job? I have attached my table so far for reference.

    Basically, I would like to create a number of tables (A7:J16) based on the number entered into C5 with a one-row space between tables.

    Also, would there be a way, once multiple tables have been created, to add the "Crew Total" cells and SUM(X,Y,Z) them into another cell?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Insert rows/create tables based on user input?

    Something like this?

    Attached file for reference.

    Named ranges
    CrewNum ='Labor and Equipment'!$C$5
    TableCopy ='Labor and Equipment'!$A$7:$J$16
    TableTotalCopy ='Labor and Equipment'!$I$16:$J$16


    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-28-2016
    Location
    St. Petersburg, FL
    MS-Off Ver
    Office365
    Posts
    17

    Re: Insert rows/create tables based on user input?

    Yeah, I wouldn't mind the button. However, the code didn't work (at least on my machine). I enter a number and click Generate and nothing happens.

  4. #4
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Insert rows/create tables based on user input?

    Did you put a number greater than 8?

    I'm working on the assumption that you can have 8 crew members per table.

    If not, and you want the number there to be the number of tables then... delete the line in red below.

    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: 8
    Last Post: 04-20-2017, 02:24 AM
  2. Macro to Copy/Insert Copied cells based on user input # of rows/formatting rules
    By gaker10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2015, 11:42 AM
  3. [SOLVED] Copy and insert rows based on user input
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2015, 10:34 AM
  4. Insert # of Rows based on User Input
    By afpilotb1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2014, 11:40 AM
  5. [SOLVED] Macro based on User input to Insert X amount of rows - Need advanced help
    By BuzzOffSweetheart in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2012, 07:06 PM
  6. Insert rows based on user input from cell value in other sheet
    By MrPisky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-31-2011, 09:08 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