Results 1 to 5 of 5

Thread: Copy groups of similar rows to new spreadsheet (& save)

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    3

    Question Copy groups of similar rows to new spreadsheet (& save)

    Here is the business problem:

    We have a spreadsheet with a lot of rows, several for each manager, and wish to "chunk it out" to make one spreadsheet for each manager.

    Envisioned approach:
    1. User will manually define "HEADER" range, that will be copied to every target spreadsheet.
    2. User will manually define "DATA" range, which is all of the managers' information, one row per employee.
    3. Macro should go through DATA, pick out the rows with [MgrValue1] in column A, and copy those (along with HEADER range), to a brand-new single-worksheet .xls file, which is then saved with as MgrValue1.xls.
    4. Continue with [MgrValue2], [MgrValue3], etc.

    Thanks in advance for the assistance/pointers.

    ALSO: how do you get the "file browser" window, for the user to define a path for these files? I currently have it as a text input box -- workable but inelegant. I know that there must be a built-in object for it.

    Thanx
    EricZ

  2. #2
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Re: Copy groups of similar rows to new spreadsheet (& save)

    Welcome to the Forum ...
    Quote Originally Posted by ericz_kp_totalcomp
    ALSO: how do you get the "file browser" window, for the user to define a path for these files? I currently have it as a text input box -- workable but inelegant. I know that there must be a built-in object for it.
    If you want to save these sheets as separate files, do you want to save each Manager's information as a separate workbook, and do you want to save the duplicate sheet in the master workbook?
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    3

    Re: Copy groups of similar rows to new spreadsheet (& save)

    Quote Originally Posted by Webtest
    If you want to save these sheets as separate files, do you want to save each Manager's information as a separate workbook, and do you want to save the duplicate sheet in the master workbook?
    Multiple sheets are not a concern. We either want to view one sheet of all the data, or give each individual Manager just their data.

    Thanx

    Z.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Copy groups of similar rows to new spreadsheet (& save)

    Sounds like you want to link the workbooks together to your master one. Links are automatically updated upon opening of the master workbook.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    3

    Exclamation Re: Copy groups of similar rows to new spreadsheet (& save)

    Quote Originally Posted by RobDog888
    Sounds like you want to link the workbooks together to your master one. Links are automatically updated upon opening of the master workbook.
    Let me clarify and add some information:
    1. We are starting with one large file. The first thing we need to do is to get them broken down into all of the components, which was the problem I'm trying to solve here.
    2. The individual files will eventually be emailed out to the individual managers, who aren't on the same network as the central office. I don't think we want to link them, just paste the data.

    Thanx
    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width