+ Reply to Thread
Results 1 to 3 of 3

Copy Worksheet X Times Based on Cell Value

  1. #1
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Copy Worksheet X Times Based on Cell Value

    How can i write a macro that will copy the active worksheet x times based on a value in a named range?


    I tried changing up a formula i found here but no luck so far:
    http://www.excelforum.com/excel-prog...-of-times.html


    Here is what i have:
    Please Login or Register  to view this content.
    The above reveals the TR_Crane worksheet then copies it (3) additional times although the number in the named range is a "2".
    Last edited by PY_; 01-04-2011 at 04:10 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Copy Worksheet X Times Based on Cell Value

    It worked okay for me. A two in the range and I get two copies.
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Re: Copy Worksheet X Times Based on Cell Value

    You are right thank you. I did not think it through enough when writing the code (bangs palm on forehead). I wanted it to count the first active sheet at "1" and add the remaining sheets to equal the total.

    Changing "For i = 1 To copynum" to "For i = 1 To copynum -1" did the trick.
    Last edited by PY_; 01-04-2011 at 04:12 PM.

+ 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