+ Reply to Thread
Results 1 to 10 of 10

Create additional tabs from a sheet's column data

  1. #1
    Registered User
    Join Date
    08-05-2014
    Location
    Philadelphia
    MS-Off Ver
    2010
    Posts
    15

    Create additional tabs from a sheet's column data

    Hi to all.
    I would like to be able to create additional sheets by scanning an existing column in my only original worksheet. My existing worksheet contains only three columns with data. Each column has a title. Based on the user's input Excel scans that title's column and creates the additional sheets. The data included in every column contain only 5 or 6 long alphanumeric values. If the cell contains a 5 long value the worksheet created takes as a name the first 2 characters. If the cell contains a 6 character long value the worksheet creates takes as a name the first 3 characters. In case the columns get updated/appended by additional or removed values the function removes or adds sheets based on the user's input.
    In the "Test" file I uploaded the user provides as input "Apples". The code goes to the column with the heading "Apples" and creates two new sheets with titles, "12" and "72D", since the first one is based on a 5-long value and the second is based on a 6-long value.
    Can someone help me?

    Thank you so much.
    Attached Files Attached Files

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2404-17531.20128
    Posts
    1,369

    Re: Create additional tabs from a sheet's column data

    Maybe something to test:
    Please Login or Register  to view this content.
    If things don't change they stay the same

  3. #3
    Registered User
    Join Date
    08-05-2014
    Location
    Philadelphia
    MS-Off Ver
    2010
    Posts
    15

    Re: Create additional tabs from a sheet's column data

    CheeseSandwich, your code works flawlessly. However, it looks into all columns. I would like the user to control which column gets scanned. So, if the user selects the second column, "Oranges", the worksheets that get created are only 3. These would be, "12", "14", and "42C". If in the future he selects the first column, "Apples", only 2 columns get created, "12" and "72D".

  4. #4
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2404-17531.20128
    Posts
    1,369

    Re: Create additional tabs from a sheet's column data

    Try:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-05-2014
    Location
    Philadelphia
    MS-Off Ver
    2010
    Posts
    15

    Re: Create additional tabs from a sheet's column data

    Thank you for the lightning fast reply. Is there anyway to get as input the column's header name and not a specific user defined range?

  6. #6
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2404-17531.20128
    Posts
    1,369

    Re: Create additional tabs from a sheet's column data

    Thie works from being given the column letter:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-05-2014
    Location
    Philadelphia
    MS-Off Ver
    2010
    Posts
    15

    Re: Create additional tabs from a sheet's column data

    Thank you so much CheeseSandwich!

  8. #8
    Valued Forum Contributor
    Join Date
    05-03-2022
    Location
    Halifax,Canada
    MS-Off Ver
    365
    Posts
    326

    Re: Create additional tabs from a sheet's column data

    This solution adds a little extra feature in that the input box only accepts letters and has a working cancel button ... just a little extra feature

    Please Login or Register  to view this content.
    Last edited by nimrod1313; 05-11-2022 at 02:25 PM.

  9. #9
    Registered User
    Join Date
    08-05-2014
    Location
    Philadelphia
    MS-Off Ver
    2010
    Posts
    15

    Re: Create additional tabs from a sheet's column data

    Nimrod1313 thank you so much. No more "OK" to delete!

  10. #10
    Valued Forum Contributor
    Join Date
    05-03-2022
    Location
    Halifax,Canada
    MS-Off Ver
    365
    Posts
    326

    Re: Create additional tabs from a sheet's column data

    I've updated the input box to make a little tighter ... see my last post for updated version

    ... I just did a few tweeks / variations on CheeseSandwich very nice solution
    Last edited by nimrod1313; 05-11-2022 at 02:36 PM.

+ 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. [SOLVED] Can a macro transfer data to tabs with same name found in column of master sheet?
    By AccountingJ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-27-2018, 03:10 PM
  2. Loop Through Column A On Sheet 1 To Create Tabs With Each Workers' Names
    By Richie77777 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2013, 06:56 AM
  3. Can you auto create multiple tabs from enterting data in a master sheet's column?
    By ambermorr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2013, 07:28 AM
  4. [SOLVED] Create Tabs based on a specific column in a sorted data worksheet
    By rockell333 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-16-2012, 11:13 AM
  5. Maco to create new tabs with data within an excel spread sheet
    By lissa843 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-12-2010, 08:33 PM
  6. Create additional tabs automatically based on input from master sheet
    By davidshluger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2010, 12:02 PM
  7. [SOLVED] Create an additional column in query/table?
    By shanew in forum Access Tables & Databases
    Replies: 2
    Last Post: 03-05-2009, 02:04 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