+ Reply to Thread
Results 1 to 10 of 10

VBA, filtering, formatting and saving various formatted versions to individual files

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    VBA, filtering, formatting and saving various formatted versions to individual files

    Hi All,

    I'm looking to automate a recurring monthly task.

    Process:
    1) Filter original data (tab 1) by colour Column "D" then priority Column "C". Reds first then Amber then Green with colours to be individually ranked by project priority 1's first then 2's, 3, 4, 5 etc.

    I've added a filtered data tab (tab 2) to show how the filtered result should look.

    2) I then need to save down 6 individual copies of this data filtered by department Column "B". The filename should be called the department name and should only contain that particular departments information.

    To illustrate i've filtered by the "Operations" department in the 3rd tab. I'd then need to save down this tab only to a new file called "Operations.xlsm"

    Hope this makes sense.

    I can do this manually simply enough but going forward there will be many more entries and more departments making it quite time consuming.

    Regards
    Neill
    Attached Files Attached Files
    Last edited by Gti182; 03-25-2013 at 06:06 AM.

  2. #2
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    i've used this code to filter the data by colour and priority but having trouble coding the filtered department data to save to a new file.

    Please Login or Register  to view this content.
    Last edited by Gti182; 03-22-2013 at 12:39 PM.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    Hi Gti182

    This Code is in the attached and appears to do as you require
    Please Login or Register  to view this content.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    That's! That works amazingly! Really appreciate it!

  5. #5
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    Hi John,

    dropped you a message. If i add an additional row to the top of the "original" tab how would this affect the code?

    Regards
    Neill

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    Hi Gti182

    If i add an additional row to the top of the "original" tab how would this affect the code
    It depends on how the new Row is populated and/or formated...show me.

  7. #7
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    The extra row added to the top of the sheet is formatted as text. In the new row A1-C1 will be a merged cell called "Project information"

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    Hi Gti182

    This is what I was concerned about
    In the new row A1-C1 will be a merged cell called "Project information"
    Show me the new file and I'll play with it...merged cells cause nothing but frustration...we'll see what we can do.

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    Hi Gti182

    The attached workbook dumps the Mergerd Cells and uses Center Across Selection in it's place.
    Let me know of issues.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    Thanks John that works beautifully. I've tested it with and without merged cells and they both work with above code. thanks again!

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA, filtering, formatting and saving various formatted versions to individual files

    You're welcome...glad I could help. Thanks for the Rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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