+ Reply to Thread
Results 1 to 6 of 6

VBA to create sheets based on cell values

  1. #1
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    VBA to create sheets based on cell values

    Hello everyone, I have a workbook where I have the macro below. It looks at the data in column D and creates a tab then names it the value of the cell. It works but I am having a few issues, (1) the macro creates 9 worksheets even if the cell values are null. (2) The macro creates a “dummy” worksheet if the value in column “D” is a duplicate.

    The current range is “D2:D10”. The range in workbooks can be 1 to almost ten thousand. I tried to change the range to “D2:D” but got an error.
    Thoughts?

    From there I need guidance, I need to reference those created worksheets and add headers. I am not sure how to reference those specific worksheets since the names can change depending on what workbook I am working on.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AccountingJ; 03-23-2018 at 02:52 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: VBA to create sheets based on cell values

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: VBA to create sheets based on cell values

    That did it, thank you. Any suggestions on how to bring over headers below to those sheets?

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: VBA to create sheets based on cell values

    This should do it:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: VBA to create sheets based on cell values

    Thanks a bunch!

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: VBA to create sheets based on cell values

    You are very 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. create sheets based on cell values with corresponding data
    By VinodN in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-29-2016, 07:16 AM
  2. [SOLVED] Create Sheets based on values in range
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-30-2015, 02:18 PM
  3. Replies: 0
    Last Post: 11-04-2013, 01:48 PM
  4. How to create and populate sheets based upon cell values in master sheet?
    By mezzopiano1423 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2013, 12:51 PM
  5. VBA Macro to Create Sheets Based on Column of Values
    By chicagoland8 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 11:39 AM
  6. Create/Name sheets based upon values
    By Miraun in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-01-2009, 12:11 PM
  7. Create Sheets based on unique values in Column
    By Hblbs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-20-2009, 08:25 AM

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