+ Reply to Thread
Results 1 to 7 of 7

write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, etc

  1. #1
    Registered User
    Join Date
    10-03-2015
    Location
    west coast is the best coast
    MS-Off Ver
    excel 2010
    Posts
    113

    write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, etc

    Hello. How can I write code to skip every two tabs create a new sheet, consolidate data from columns A and B in the first two tabs and place this consolidated data in column B of the newly created tab (using left row as key) and then repeating this process for the rest of the sheet? This is the code I've come up with so far but the middle section (related to the consolidate code) is wrong. How can I correct it, and get it to reference the two sheets to the left of each sheet that is created by the loop? Thanks!!


    Please Login or Register  to view this content.

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, et

    You haven't closed the other thread and you open a new thread? How about having a little respect for someone helping you and either giving feedback as to whether you need further help, the code works or doesn't work, you are good to go or not.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Registered User
    Join Date
    10-03-2015
    Location
    west coast is the best coast
    MS-Off Ver
    excel 2010
    Posts
    113

    Re: write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, et

    @ skywriter. What do you mean? I thanked you for the looping code and gave you feedback. I said that the code worked except for one part, which I fixed on my own. This code uses that code and adds the consolidation piece, which is what I'm asking for help on. I don't know how to write code to consolidate data and then reference the two prior sheets.

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, et

    You didn't read my last post, otherwise you wouldn't be asking about the 3 and it should be a 2 not a 1, and you didn't fix it.

    The West coast is the best coast.
    L.A. baby.

  5. #5
    Registered User
    Join Date
    10-03-2015
    Location
    west coast is the best coast
    MS-Off Ver
    excel 2010
    Posts
    113

    Re: write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, et

    I did read your last post. The first code that you provided worked for me. I tried it. And you're right, it's 2, not a 1--nor a 3 Thanks for your help.

  6. #6
    Registered User
    Join Date
    10-03-2015
    Location
    west coast is the best coast
    MS-Off Ver
    excel 2010
    Posts
    113

    Re: write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, et

    This is my second attempt but the data consolidate is still not working

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-03-2015
    Location
    west coast is the best coast
    MS-Off Ver
    excel 2010
    Posts
    113

    Re: write code to skip two tabs, create a tab, code, skip two tabs, create a tab, code, et

    Mr. Skywriter!! You done done it again.

+ 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. write code to create a pivot chart for all the items
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2015, 05:28 PM
  2. [SOLVED] How can I automatically insert this source code into new tabs or all Tabs?
    By Chad Bateman in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-01-2015, 06:42 PM
  3. Copy Tabs from different excel file by using code name of the tabs
    By varun.kalra1988 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2014, 02:03 PM
  4. [SOLVED] IF Exists or on Error Then - Skip Code- How to write code?
    By Jack7774 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2013, 06:45 PM
  5. How to skip blank tabs of cell while using macro
    By bhagwat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2009, 06:28 AM
  6. Code to create tabs in single excel sheet
    By deepa prabhakar in forum Excel General
    Replies: 1
    Last Post: 05-26-2006, 05:20 AM
  7. skip some code
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-01-2005, 01:25 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