+ Reply to Thread
Results 1 to 18 of 18

Multiple Sheets creation based on data

  1. #1
    Registered User
    Join Date
    11-27-2018
    Location
    Mumbai, India
    MS-Off Ver
    2016
    Posts
    7

    Multiple Sheets creation based on data

    I want to create multiple worksheets based on similiar data from attached excel sheet. Similiar data should be clubbed together in same worksheet.
    For eg. data from column 'I2' to 'I4' with number /PNS/TN/02208 should go in one excel sheet and similiarly multiple worksheets will get created for other similiar data too. Hope my requirement is clear to you.

    Attached sheet for your doing the needful.

    Thanks & Best Regards,
    Javed Ali Sayed
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    The attached file is not (yet) and Excel file, so I suggest your rephrase your question for others to understand better.
    If I understand you correctly you want to open the CSV file and create a workbook with a number of sheets that answer to your criteria.
    Don't know if I have the correct answer for you but I will try and see if I can help
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    11-27-2018
    Location
    Mumbai, India
    MS-Off Ver
    2016
    Posts
    7

    Re: Multiple Sheets creation based on data

    Sorry Brother. It's a CSV file. Yes I want to open the CSV file and create workbooks based on details provided in column 'I'.
    For eg. it should create a workbook by name '02208' and should have all data related to '02208'. Currently we are opening the file
    deleting other data and saving the new workbook by '02208'. Its all manual efforts.
    Similiarly multiple workbooks should be created for 02291, 02292 and so on.
    Everytime we get this CSV report from an application and we need to create multiple files based on data in column 'I'.
    Hope my question is clear.
    Thanks.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    Okay, that's clear, but the next csv file you get, will there be identical values in column "I" as the previous one? I am asking this because then you do not create a new workbook but open an existing one and append the new data to the workbook 02208 or 02291 from the previous run.

  5. #5
    Registered User
    Join Date
    11-27-2018
    Location
    Mumbai, India
    MS-Off Ver
    2016
    Posts
    7

    Red face Re: Multiple Sheets creation based on data

    Thanks for your response. There won't be identical values in column "I" everytime when CSV file is generated. The data may differ in column 'I'.

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    Okay, clear, tank you for updating

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    What about the path reference in I? and the otherone?

  8. #8
    Registered User
    Join Date
    11-27-2018
    Location
    Mumbai, India
    MS-Off Ver
    2016
    Posts
    7

    Re: Multiple Sheets creation based on data

    well i did not understood your question. whatever data (from column 'A' to 'H') corresponding to the number in column 'I' after /PNS/TN/, a new workbook to be created and it should have all the contents as below. Similiarly workbooks to be created for other 02291, 02292...............

    DWG/DOC NO REV DRAWING/DOCUMENT TITLE ISSUE REASON DISCIPLINE DOC. TYPE FILE PATH REMARKS Out.Tr.Ref
    4100-FDTY-2-80-0001-001 2 General - Electrical Symbols & Legends IFA 2 80 C:\Users\Rasheed.Veettil\Documents\Assai\GC171086D0-PNS-TN-2208\4100-FDTY-2-80-0001-001-2.zip /PNS/TN/02208
    4100-FDTY-2-80-0001-002 2 General - Electrical Symbols & Legends IFA 2 80 C:\Users\Rasheed.Veettil\Documents\Assai\GC171086D0-PNS-TN-2208\4100-FDTY-2-80-0001-002-2.zip /PNS/TN/02208
    4100-FDTY-2-80-0001-003 2 General - Electrical Symbols & Legends IFA 2 80 C:\Users\Rasheed.Veettil\Documents\Assai\GC171086D0-PNS-TN-2208\4100-FDTY-2-80-0001-003-2.zip /PNS/TN/02208

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    I mistook the contents in Column "I" of the cells for file paths, my mistake.

  10. #10
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    Hi, just to tell you I'm almost there.
    Testing the final steps for you.

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    Okay, here's the file.
    It will create all the workbooks in the same folder as where you place this file.
    To change; modify the path in the variable destFolder (DO NOT FORGET THE FINAL BACKSLASH)

    I have attached two of the exported files

    The processing progress is shown in the status bar in percentages

    Hope this is what you want.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    11-27-2018
    Location
    Mumbai, India
    MS-Off Ver
    2016
    Posts
    7

    Re: Multiple Sheets creation based on data

    Dear Brother Keebellah,

    Your are a star. Genius. Loved it. Awesome. Thank you very much. GOD bless you.

    Best Regards,
    Javed

  13. #13
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    I made some modifications for the folder selection and so.
    I hate hard coding paths in VBA, it's against my rules
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    11-27-2018
    Location
    Mumbai, India
    MS-Off Ver
    2016
    Posts
    7

    Re: Multiple Sheets creation based on data

    Thanks. One more help required. Can we have the output files in csv format instead of xls please.

  15. #15
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    No os the time for you to start working on your VBA skills, create the new workbook as it is now and the save it again as CSV file.
    part of the code looks something like this
    Replace the code in your module with the red lines

    Please Login or Register  to view this content.

  16. #16
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    I can't leave it to you, there are one or two things you need to know and edit, so here is the modified file
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    11-27-2018
    Location
    Mumbai, India
    MS-Off Ver
    2016
    Posts
    7

    Re: Multiple Sheets creation based on data

    Thank you very much. I know only basic excel. Appreciate your efforts.

    Best Regards,
    Javed

  18. #18
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Multiple Sheets creation based on data

    Hope for yourself that you can find the time to play around with VBA, it is fun, but ... you need time , very much time, and patience and your own imagination is the only limit
    Happy coding and good fortune.

+ 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] Merge multiple sheets data into 1 sheet based on multiple criteria (List Based)
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 43
    Last Post: 08-10-2018, 11:08 AM
  2. [SOLVED] Merge multiple sheets data into one worksheet based on multiple criteria and date
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-03-2018, 04:19 AM
  3. Replies: 12
    Last Post: 11-20-2017, 04:45 PM
  4. Replies: 29
    Last Post: 01-01-2017, 10:25 AM
  5. Replies: 0
    Last Post: 05-27-2015, 03:50 AM
  6. Auto creation of sheets based on Data sheet with a sample output shown next to it
    By paradise2sr in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-27-2013, 07:56 AM
  7. sorting of values based on 2 filters and creation of extra sheets resuming everything
    By orphelion in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2011, 04:28 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