+ Reply to Thread
Results 1 to 5 of 5

Create a separate workbook using data from another workbook.

  1. #1
    Registered User
    Join Date
    12-23-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    2

    Red face Create a separate workbook using data from another workbook.

    Hello everyone,

    I am very new to using macros in excel. I have played around a lot and I am getting close to what I need, but I am looking for some assistance! :)

    Basically what I am trying to do is input a list of data on Sheet 1, have this data automatically be transferred onto Sheet 2, but skip any blank rows between data on sheet 1. Then have a save button on sheet 2 that then saves a separate workbook with just sheet 2 in it.

    Thanks in advance!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Create a separate workbook using data from another workbook.

    To make a new workbook with just the sheet2

    Please Login or Register  to view this content.

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

    Re: Create a separate workbook using data from another workbook.

    Hi macro_noob3030

    Probably the easiest way is not to use macros!

    I am assuming that if there is data in column A, then there will be data in B through to (whatever) and likewise if there is nothing in column A then that row is completely blank.

    Copy from sheet 1 A1 : last row last column to Sheet 2 B1

    In column A number from 1 to last row used

    Sort whole sheet on column B.

    This will put all blank rows at the bottom of the data. Delete these rows

    Sort whole sheet on column A (to put back in original order)

    Delete column A

    Delete Sheet 1

    Save As (New name)

    If you would like this automated by means of a macro, let me have a sample of your data and I will write such a macro

    Regards
    Alastair

  4. #4
    Registered User
    Join Date
    12-23-2016
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    2

    Re: Create a separate workbook using data from another workbook.

    Hi Alastair,

    Thanks so much for your help! This is the kind of data I want to automate.

    Sheet 1 contains the following data:

    Capture.PNG

    From this sheet, the data I care most about are 'Code' and 'Qty'. I am basically trying to transfer these two columns from sheet 1 to sheet 2 to create the following:

    Capture2.PNG

    So the list has just the data without any of the spacing from sheet 1. Then I want to save sheet 2 as a separate excel workbook that contains just sheet 2.

    Is this possible?

    Thanks for your help in advance!

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

    Re: Create a separate workbook using data from another workbook.

    Hi macro_noob3030

    I have just come back to the forum after a year's break. I have discovered that I have forgotten a lot of syntax!

    Anyway - here's a couple of files that should fit the bill. Let me know how you get on.

    If you have not run macros before, you will need to set preferences: File>Options>Trust Center>Trust Center Settings>Macro Settings>Check "Enable all macros"

    Regards
    Alastair
    Attached Files Attached Files

+ 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. Replies: 0
    Last Post: 02-04-2015, 01:27 PM
  2. Replies: 3
    Last Post: 07-01-2014, 02:48 PM
  3. Data will be copied from a separate workbook to worksheet RawData in another workbook
    By pghpens44 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2014, 10:07 AM
  4. Replies: 2
    Last Post: 11-28-2013, 09:00 AM
  5. [SOLVED] Extract data from one workbook and populate a separate workbook
    By gobeavers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2012, 05:45 PM
  6. Create pivottable in separate workbook with ptcache
    By Martin Los in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-06-2005, 08:05 AM

Tags for this Thread

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