+ Reply to Thread
Results 1 to 3 of 3

Switching sheets and copying data

  1. #1
    Registered User
    Join Date
    06-07-2009
    Location
    london, england
    MS-Off Ver
    excel 2010
    Posts
    36

    Switching sheets and copying data

    I could do with some help as struggling with switching between sheets. I'm trying to write a code which:

    1. If the data is for a new person is create a spreadsheet with their name and adds a groupnamed tab
    2. If not a new person, then adds a new group in the existing sheet after the last group name
    3. Copies the data from the master workbook template sheet into the current group tab (in new or existing sheet) and saves
    4. If the next person is different then it closes the sheet
    5. Returns to the master sheet

    I would be really grateful if someone could help me solve this.
    Thanks
    James

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Switching sheets and copying data

    your code starts with If lastperson <> Person Then
    but lastperson and Person are not defined
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    06-07-2009
    Location
    london, england
    MS-Off Ver
    excel 2010
    Posts
    36

    Re: Switching sheets and copying data

    Yes, sorry, I have defined those earlier in the code. Can you assume the all the string variables have been defined.

+ 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