+ Reply to Thread
Results 1 to 6 of 6

Copying Certain Rows To New Workbook And Saving

  1. #1
    Registered User
    Join Date
    12-12-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question Copying Certain Rows To New Workbook And Saving

    Hi all,

    I am looking for a way to automate the following task:

    To take all rows that have a certain value (Selectable at the start of the operation) in Column I, and copy them to a new Workbook along with Row 1 (Titles for Columns), and then have this new Workbook save, in the same folder as the original file, with its name being the value selected and searched for.

    For example:

    I would like a prompt on running the macro asking which, "Building Name," I would like to search for and then have it end with all the rows containing that Building name copied to a new workbook saved as "Building Name".xls

    I'm a complete novice, so any help in this area would be great. I would attach the file but it contains sensitive data. Thank you very much.

  2. #2
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Copying Certain Rows To New Workbook And Saving

    Hi seanpatrickboyd

    Any help you receive will be far better if you can give an example. If you cannot make your data anonymous, perhaps you could just mock up something?

    Regards
    Alastair

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copying Certain Rows To New Workbook And Saving

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-12-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Copying Certain Rows To New Workbook And Saving

    Hi,

    I have attached a file that is more or less the same as the current worksheet, only much, much smaller.

    That solution has managed to create a new file and save it as the value I entered but has only copied across the title row and none of the actual data.

    The only columns I actually need copied across are "Item Name", "Last Known User", and "Building Name"

    Would it be possible to do this so that it automatically created a different sheet for each different Building Name and then saved them all seperately to their respective names? Or is this a step too far?

    Thanks a lot for your help so far.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copying Certain Rows To New Workbook And Saving

    In order for the macro to work you would need to type in the Building Name exactly as it is in the Column. I tested on your sample and it worked.
    Last edited by JOHN H. DAVIS; 12-13-2013 at 10:06 AM.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copying Certain Rows To New Workbook And Saving

    Will the Building Names be sorted as in your sample?

+ 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. Copying data from one workbook to new workbooks and saving them with filenames
    By vinbill5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2013, 06:37 AM
  2. [SOLVED] Copying specific rows from an open workbook into the next row of a closed workbook.
    By Deimola in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2012, 12:59 PM
  3. Copying sheets to a new workbook and saving it.
    By walid66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2010, 04:36 PM
  4. Copying workbook and saving to new file
    By KCressy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2008, 01:01 PM
  5. [SOLVED] Copying sheet or saving workbook kicks off ComboBox change Sub
    By sultann@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2006, 01:25 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