+ Reply to Thread
Results 1 to 6 of 6

Create new worksheet from list

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    23

    Create new worksheet from list

    Hi all,

    I know there's similar posts on this but i've had a look through and none seem to solve my problem

    I'm trying to create a macro which goes down column C and finds cells which have a "No". When it does, it creates a new worksheet with the name in column B (ie. the name next to the No)

    here's what i have so far, but everytime i run it i get an 'application-defined or object defined error' on the last line of code (ie. the line naming the worksheet)

    Please Login or Register  to view this content.
    any help would be great! i'm sure it's something very straightforward i'm missing here

    as a side note, i'm also trying to get the same name to copy into cell A1 of the corresponding worksheet

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Create new worksheet from list

    Hi,

    You just need to specify which worksheet to get the name from. So instead of
    Please Login or Register  to view this content.
    try
    Please Login or Register  to view this content.
    but replace "Sheet1" with the name of the worksheet containing the list of worksheet names.

    For your side note, this should be relatively simple. After you name the worksheet, add this line of code
    Please Login or Register  to view this content.
    NB: I haven't tested this as it seems relatively simple off the top of my head, but if it doesn't work please be sure to let me know and I'll put a little extra time and effort into making sure my next response is a working one :P

    Hope this helps

  3. #3
    Registered User
    Join Date
    07-24-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Create new worksheet from list

    genius! it must be a monday if i'm leaving out which worksheet it's referring to...

    That worked perfectly (including my side note), except that it only generates the first worksheet... any ideas as to why this would be the case? the code looks fine to me..

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Create new worksheet from list

    Hi. I'm glad it worked.

    It will continue to make all worksheets if you specify the worksheet in the "If" condition. So instead of
    Please Login or Register  to view this content.
    try
    Please Login or Register  to view this content.
    again replacing "Sheet1" with the appropriate worksheet name.

    Is this what you're after?

  5. #5
    Registered User
    Join Date
    07-24-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Create new worksheet from list

    failing to name the worksheet got me in trouble again.. yes, thankyou!

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Create new worksheet from list

    You're welcome!

+ 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. How do i create a list from data in other worksheet.?
    By MERLIN2708 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-08-2009, 12:16 PM
  2. Create Match List From Another Worksheet
    By chimp in forum Excel General
    Replies: 2
    Last Post: 06-25-2008, 02:19 AM
  3. create a dropdown list on one worksheet/tab, from another worksheet/tab
    By harchunk in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-16-2007, 03:46 AM
  4. create a list base on another worksheet
    By tikchye_oldLearner57 in forum Excel General
    Replies: 2
    Last Post: 05-17-2006, 09:10 AM
  5. Use a macro to create a new list using another worksheet
    By ineedhelp2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2005, 02:05 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