+ Reply to Thread
Results 1 to 10 of 10

How to split data into multiple worksheets based on column and change its formating

  1. #1
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    How to split data into multiple worksheets based on column and change its formating

    Hi,

    I need your help in configuration of VBA code. I have managed to find a VBA code that splits data into multiple worksheets, but now I need it to be place in specific form. So, the splited data needs to be placed in new worksheet in new changed form.

    I have attached an excel file with VBA code "XXXXXX" that splits the data. Now I need it to redisign the data splited. If you lunch the VBA, you will get several of new worksheets. What I want it to look like, is the difference between worksheet "zbig noc" and "AAAAA".

    many thanks for your help
    0002361186-20140821.xls

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to split data into multiple worksheets based on column and change its formating

    Hi,

    Why do you need separate sheets, wouldn't a Pivot Table be more efficient and useful?
    If not why not use a Data Advanced Filter. Set up a drop down cell somewhere that lists all the 'Pole MPK' names and use that selection as the criteria range for the Data filter.

    The last thing I'd resort to is VBA for this sort of thing.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: How to split data into multiple worksheets based on column and change its formating

    Hi Richard,

    Thanks for your replay.

    I need it to do exactly the way I have described. Actually, I am currently working the way you described, but then I have to copy/paste separate data to multiple worksheets and send to customers. So, the work has to be done anyway and VBA is perfect for this. I'm stuck on the "redecoration" part, which I think should be the easiest one pls see the picture attached - this has to be done for each worksheet. Each table has different number of rows and the same number of columns.

    p.s. is it possible to set changable (according to the table size) print area for each worksheet?

    Przechwytywanie.jpg

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to split data into multiple worksheets based on column and change its formating

    OK, but you still don't need to create separate worksheets. Just hold a list of names and their email addresses in a table and get the macro to work down this list and use the Advanced Data filter to extract the relevant records to a single output area.

    Then have the macro copy this output area to a new workbook, save it and using the email address have VBA generate the email and attach and send the workbook to the customer.

  5. #5
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: How to split data into multiple worksheets based on column and change its formating

    are you able to do this makro?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to split data into multiple worksheets based on column and change its formating

    Yes, sure,

    I'm busy just at the moment but I'll come back later. I'm assuming you use Microsoft Outlook as the email client. Is that correct?

  7. #7
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: How to split data into multiple worksheets based on column and change its formating

    Yes, I'm using Microsof Outlook. Many thanks in advance.

    I will be on vacations for the next 7 days and wont have access to the internet, so I wont replay during that time.

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to split data into multiple worksheets based on column and change its formating

    Hi,

    The attached is one solution.

    Fill in the email addresses in column P and press the blue button.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: How to split data into multiple worksheets based on column and change its formating

    wow, this works great. many thanks. but still, I have 2 more questions to ask:

    - I still need multiple worksheets. I just need it to save this way - I generate these kind of reports every day, so it is much more convenient to have it all in one file
    - are you able to write VBA that is not generating e-mails on each client, but separate pdf files (ready to print)? - in this verion I dont need email addresses.

    Many thanks Richard

  10. #10
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: How to split data into multiple worksheets based on column and change its formating

    one more thing. I need SUM formula in each table. I think it is something with this:
    ActiveCell.FormulaR1C1 = "=SUM(R[2]C:R[" & ActiveSheet.UsedRange.Rows.Count & "]C)"

+ 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] How to split worksheet into multiple worksheets based on column content
    By Laurelmzitney in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-03-2014, 10:57 AM
  2. Split data into multiple worksheets based upon a column in master worksheet
    By cep3927 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-07-2014, 10:38 AM
  3. Split Date into Multiple Worksheets based on Data
    By keithm_007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-12-2014, 12:00 PM
  4. How to split worksheet into multiple worksheets based on column content
    By jjexcels in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 11-05-2013, 11:42 AM
  5. [SOLVED] How to split worksheet into multiple worksheets based on column content
    By johnboytweed in forum Excel General
    Replies: 12
    Last Post: 10-16-2013, 12:01 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