Create New Workbook With Separate Sheets From Data In Another Workbook

Jul 16, 2012

I have been tasked with creating a macro which creates a new workbook wherein each sheet contains the information for one site from the active sheet. The active sheet already has the values sorted by the site such that all information needing to be copied from the active sheet into the new workbook is together.

I.E.

ATL
ATL
ATL
ATL
CEN
CEN
JCK
JCK
etc.

There are 8 different sites on the active sheet: ATL, CEN, DAL, HAR, JAS, JCK, VIS, NOV

The macro needs to find the range for all of the data of each site and copy/paste that data into a new workbook such that ATL would have its own sheet, CEN would have its own sheet, and so on. The data ranges from A:R.

So, for example, the macro would find that the last row with ATL in the "B" column is 6095 and would then copy A2:R6095 and insert that data into the new workbook under Sheet 1.

I had some code that I had adapted to select the range for each of them, but the code loops through the entire sheet (which is 44,307 rows long) for each site making it a quite clunky and very slow step in an even longer macro. Since the data is already sorted, I know there must be a way to have the macro stop searching when it reaches data not equal to the data the row before, however, my experience with VBA is limited, and I have been unable to find a solution. Also, the data does not have to be conserved after being sent to the new workbook, if that would speed up the macro.

View 5 Replies


ADVERTISEMENT

How To Have Single Userform Put Data Into Two Separate Sheets Within Same Workbook

Feb 25, 2014

Is it possible to have a single userform put data into two separate sheets within the same workbook.

I have a userform set up for entering client data into a quote register,with no problems ( sheet 1)

A1, A2, A3, A4, A5, A6, A7, A8, A9

What I would like is for the data to also go to sheet 2, where I have a form set up to print off for our technicians to take on site.

The problem will be that I would like the data A1, A2, A3, A4, A5, A6, A7, A8, A9 not to store on this sheet after it is printed, so the next set on entries , can be printed etc.etc

View 2 Replies View Related

Delete Sheets And Create New Workbook In Shared Workbook

Jun 2, 2014

I wrote a code in unshared workbook and it works fine. But when i make it shared i get Run-time error '1004' Delete method of worksheet class failed.

The Deleting of worksheet only occurs once (when the new wb is created) so is there i can unshare and share it back when the process is complete?

View 3 Replies View Related

Macro To Create New Workbook And Sheets Inside Each Workbook

Mar 31, 2009

I have a spreadsheet which has all the names of trips from a warehouse, the day that they operate (1,2,3 etc) and the job line allocated to each trip. It looks something like that:

A B C
DAYTRIPCUST

I would like to create a macro that will be creating 7 new workbooks and then in those workbooks as many sheets as the trips. In these sheets, the customers should be displayed.

How do I write it? I could not find how to have a "dynamic choice" in the macro. I.e. not to have the criteria as "1", "trips1" but to choose from the range of inputs that are available.

View 9 Replies View Related

Create Separate Worksheets Within Workbook

Oct 28, 2008

I have a table of data with three columns. In the first column I have different values, but they can also repeat. How can I have VB look at my table and for every distinct value in the first column create a sheet with the value name and paste all the data into that same sheet?

View 9 Replies View Related

Copy Data From Multiple Sheets In Workbook To Different Workbook But On One Worksheet

Feb 7, 2014

I am looking for a code that would copy the data from each worksheet in a given workbook and then paste to just one worksheet within a different workbook. The Sheet names are auto generated when I run this canned report but the naming structure is always the same...the first worksheet is named Repair Details and then the next sheet is named Repair Details_1, the next sheet is named Repair Details_2 and so on for every sheet in workbook. So I would like to copy all of the data(Headers to last cell) and then paste in a worksheet(ex: Master Repair Report.xlsx and the worksheet could be titled Master Repair Details) on a different workbook, then the next sheet would copy from the one under the header to the last record and paste to the same workbook. This process would repeat for every worksheet in the Repair Details Workbook and paste to Master Repair Details worksheet in the Master Repair Report workbook.

View 4 Replies View Related

How To Separate Row Data From One Workbook Into Separate Workbooks Based On Cell Data

Apr 23, 2014

I need to separate row data from one workbook into separate workbooks based on cell data. Currently I filter the data, copy and paste it to a new workbook and save it. It's a tedious process and was hoping to find a way to automate it. I have attached a sample file. In this instance, I would like a separate workbook for the filtered data in Column 1 and then all the row data gets copied to new workbook. So all of Pennsylvania data would get copied to new workbook, then all of the Michigan data gets copied to a new workbook. I have also attached an example of the end result that I need.

View 9 Replies View Related

VBA - Copying Data From Another Sheet And Create Separate Sheets

Feb 24, 2014

I have a workbook with two sheets the first one is called "SDL" contain master data for three TEAMS (TEAM.A, TEAM.B & TEAM.C") and the second worksheet is called "SDL_Calendar" for graphical chart view.

I need Macro to copy the relevant column data from "SDL" sheet and paste into appropriate column in "SDL_Calendar" sheet then make separate sheets for each "TEAM".

I have attached the work book of what I am trying to accomplish.

View 6 Replies View Related

Copy A Range Of Cells In Another Workbook Opened In A Separate Instance Of Workbook

Feb 11, 2010

I m not able to use the standard Excel Paste Special function when I copied a range of cells in another Excel workbook opened in a separate instance of Excel. Instead, Paste Special thinks that I have copied some non-Excel objects and gave me the Paste As options. This is not the case if I open both workbook within the same instance of Excel. Could you share with us if there is a trick to trigger the normal Paste Special options in such situations (without having to invoke Macro procedures)?

View 2 Replies View Related

How To Create Array Of All Sheets In WorkBook

Nov 11, 2011

Sub Macro2()
Dim stgSheets As String, Cnt As Long
Dim arrSheets()
Cnt = Sheets.Count
ReDim arrSheets(Cnt - 1)
For i = 1 To Cnt
stgSheets = stgSheets & Sheets(i).Name
arrSheets(i - 1) = stgSheets
'sSheets = sSheets & "", ""
Next i

[Code]...

View 2 Replies View Related

Extracting Information From A Workbook And Saving Into A Separate Workbook

Feb 21, 2014

i have a workbook blank template for my colleagues to fill in, they fill in this blank template and save it under the serial number of the item they are creating. However a lot of errors exist when they input the serial number inside the workbook where the serial number is a duplicate of a former serial number.

Anyhow i was wondering is there any way when they input the serial number into the worksheet that i could get it to save in a separate workbook and then have conditional formatting to check those serial numbers in the workbook to see if they match?

View 4 Replies View Related

VBA To Create Individual Sheets From Workbook And Save

Feb 12, 2010

I have a workbook with roughly 28 tabs(sheets) and i need to be able to run a macro that will create a new sheet for each tab and name it based on the tab name.

View 9 Replies View Related

Create IF / LOOKUP Formula To Look At Multiple Sheets Within Workbook?

May 5, 2014

New to using Excel formula's and am trying to create an IF/LOOKUP formula to look at multiple sheets within a workbook and display the information within the 'compare' sheet.The yellow cells are where data will be entered.

What I am trying to achieve:

Type the store numbers on the compare sheet (B2 and D2). For the sheet attached I have put 190 (in B2) and 2012 (in D2)

B2 store shows the predicted and actual values of 190 in columns B & C

D2 store shows the predicted and actual values of 2012 in columns E & F
(No need to worry about variance and difference columns)

So, if I change the store numbers in B2 and D2 to any of the sheet numbers, I want it to display the correct info for that particular store within the compare sheet.

I have attempted a formula, which you can see... I have basically looked at some previous sheets that had IF and LOOKUP on it and tried to replicate that for my sheet, but with no luck.

View 3 Replies View Related

Macro To Create Sheets In New Workbook Based On Template And Evaluator?

Feb 10, 2013

I had created a base data with evaluator and performance appraisals templates which should be sent to each evaluator for filling up the forms based on templates

Next,

Macro that would i require will be

Where in my base data if i select filter of "Arun", i will performance appraisal templates in column I. Next, i have sheets individually created templates which refer column I

So, based on arun filter if i select, it should create a new workbook for arun and six individual sheets of employees reporting to him with a base data and appraisal templates similarly if i select anita in filter , it should create a new workbook for anita and six individual sheets of employees reporting to her with a base data and appraisal templates

View 9 Replies View Related

Extracting Data From Separate Workbook?

May 25, 2014

is it possible to place sheet names beside the data? What I mean is that, I'm currently working on a report which extracts data from the current workbook (many sheets) and paste it into a new workbook. As there would be duplicates due to many different sheets. I would like to have the duplicates removed but have the sheets name which they are found in the columns beside.

View 9 Replies View Related

Compare Data In Separate Workbook Or Worksheet

Jan 30, 2010

Im working with a huge amount of data in BOOK1.xls and once or twice a week I received an update of the list.

1. I need to compare and find out from the new updated worksheet if there is a new revision, and if there are new documents added to the list. I have tried Vlookup..but it didnt work for me. Ex. Doc1 has revision 1, 2 in my BOOK1 that I am working on. Note that there is a repetition of the DocName, Doc Number except for the revision.

View 3 Replies View Related

Input Data Into Userform From Separate Workbook

Jul 25, 2014

So I have a workbook (Workbook1) that opens a userform on launch. I have another workbook (Workbook2) that has a button to open Workbook1. Upon opening Workbook1 (and as a result the userform) I'd like to input data from Workbook2 into the fields of the userform. I'm not exactly sure how to reference the userform fields to input data from Workbook2.

I'm trying the following code:

Workbooks.Open (Workbook1)

With Workbooks(Workbook1).Userform1
UserformField1 = "Billy"
UserformField2 = "John"
End With

The macro is opening Workbook1 and the userform but the fields return blank.

View 1 Replies View Related

Save UserForm Data Into Separate Workbook

May 22, 2008

I have a form which creates a budget based on user input. I want to save that user input in a separate workbook. My goal is to reduce the file size. I have several modules which perform evaluations/ calculations, and then format the output in a worksheet, but the size is pretty large 450KB.

I was thinking that I could set the control source, to different cells on the worksheet, and then just copy the worksheet to a new workbook, and save the data by itself. Then if I wanted to change the data for a given budget, I would copy the sheet back into the workbook that contains the modules, and load the form again. Is this a good solution? Is there a better way? Please let me know if I can provide more information.

View 9 Replies View Related

Excel Macro To Create New Workbook Based On Category In List With Respective Sheets

Apr 27, 2014

I need new workbooks based on category name in the below list. Respective sheets should be copied from the existing workbook with items as sheet names. List can be updatable.

category(workbookname)Items(sheets)
Vegetables carrot
vegetables brinjal
meat chicken
meat Fish
meat Mutton
grains Wheat
grains Rice

View 4 Replies View Related

Automatic Data Entry To Separate Workbook From Userform

Jul 30, 2013

I have a userform, UserForm1, which lives in a spreadsheet called 'Data Entry.xls' There is nothing else on the spreadsheet itself, it's just for the use of a userform.

I would like the user to populate textboxs in UserForm1 but have that update cells in a separate spreadsheet 'Training.xls' in the same directory.

I have this code at the moment to find the next empty row and to input data into it, which is working perfectly to enter data to sheet1 in Data Entry.xls:

[CODE]Private Sub CommandButton1_Click()

eRow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(eRow, 1) = TextBox1.Text
Cells(eRow, 2) = TextBox2.Text
Cells(eRow, 3) = TextBox6.Text

End Sub[CODE]

How can i modify it so it would do the same thing, i.e find the next empty row and then populate with what the user types in the textbox but in Sheet1 of 'Training.xls'

Would 'Training.xls' need to be open?

View 2 Replies View Related

Macro - Copy Data Based On Info In Cell From Separate Workbook

Jun 4, 2014

I have an invoicing spreadsheet, what I want is to have a main working page and then tabs after separated by vendor, but save myself a bunch of manual work in the future.

I want to be able to work in the main tab and the other tabs automatically update with the new info.

So I want the macro to search the text in the first column and if it finds "AIM Land Services Ltd." then I want it to populate the appropriate tab, in this case "AIM", with all the respective information after it ie: A-O. But I dont want it to select any other vendors/ info.

This is what I have:

Sub MoveData()
For Each cell In Range("A1:A1") ' Where to look for the date
If cell.Value = "AIM Land Services Ltd." Then ' The date
Range("A5:O350").Select ' What is the range to copy
Selection.Copy ' Copy it
Sheets("Invoice_Log").Select ' Select the Sheet it applies to
Range("A5").Select ' Where to paste the data

[Code] .........

View 1 Replies View Related

Creating New Workbook / Copying Sheets And Saving Workbook - Subscript Error

May 30, 2014

Trying to create a new workbook from another open workbook, then copying all the sheets that aren't called "Summary" to that new open workbook and then saving it. I get a subscript error on this line:

[Code]....

View 3 Replies View Related

Copy From Closed Workbook Then Create New Workbook

Jan 31, 2007

I've got a problem with this code, have been wracking my brains about. Here is the process I am trying to do:

1) Copy a range (a2:av1000) but (ideally) find the last populated row from a closed workbook (with a different password)
2) Create a new workbook and paste this data into it at A2
3) Close all the workbooks but only save the new one.

View 9 Replies View Related

Separate Workbook By Value In Column Into Separate Workbooks

Feb 25, 2013

I have 10 very large workbooks that are all setup in the same format. In column Z is a numerical value from 1 to 83. I have been trying to filter the sheet and then copy one at a time from 1 to 83 but that takes a LONG time especially when there is 10 workbooks to do.

Is there anyway I can run a function or macro or something that would just automatically look down the column Z and put each row into a it's own workbooks?

I have attached a sample of what the workbooks look like right now.

Sample123.xlsx‎

View 4 Replies View Related

Create New Workbook From Existing Worksheet Data

Feb 17, 2009

I am working on this estimating template. To be used on Excel 97, 2000 and XP systems.

I have a few issues i am unable to resolve.

There are 2 of the worksheets (Short Quote and Stores Req) which individually need to have a button on them so i can create a new workbook as an exact coy of that sheet. but with just the values and not the formulas.

Also i am unsure on the macro on the workbook currently( as i dont know how to do macros) i dont know what it does?

View 7 Replies View Related

Create New Workbook Based On Column Data

Jan 23, 2008

I was going through a thread that is open now about a similar subject: Create Workbooks & Worksheets For Each Group In Table. I tried getting it to work myself but was unsuccessful. I want a code that will create a new workbook for every new Vendor. I tried doing it myself but was getting compile errors... If this is not what I should be using let me know, it works the way I want with just worksheets, i thought it would be an easy conversion to workbooks

Sub PagesByDescription()
Dim rRange As Range, rCell As Range
Dim wSheet As Worksheet
Dim wSheetStart As Worksheet
Dim strText As String
Set wSheetStart = ActiveSheet
wSheetStart.AutoFilterMode = False
'Set a range variable to the correct item column
Set rRange = Range("A1", Range("A65536").End(xlUp))
'Delete any sheet called "UniqueList"
'Turn off run time errors & delete alert
On Error Resume Next
Application.DisplayAlerts = False
Worksheets("UniqueList").Delete
'Add a sheet called "UniqueList"
Worksheets.Add().Name = "UniqueList".....................

View 3 Replies View Related

Create Separate Sheets For Each Team By Year

Feb 27, 2014

I have a code that will create separate sheets from “SDL_Calendar” sheet for each team and its working fine. Modify the code to create sheets for each Team BY YEAR based on user selection in Cells “H6”, “H7” and “H8” in “P6_Report” sheet. For filtering BY YEAR Column "D" Can be Used in “SDL_Calendar” sheet.

I have attached the work book of what I am trying to accomplish :

[Code] ......

CreateSheetsByYear_new.xlsm‎

View 14 Replies View Related

Transferring Data Between Sheets In A Workbook

Oct 25, 2013

I have a workbook with two sheets of sku numbers. One sheet has sku numbers and prices, the other just has sku numbers but some of the sku numbers on the second list have been broken out by sizes. I need to take the prices from the first list and transfer them to the matching sku numbers on the second including the ones with multiple of the same sku but with prices. Also, not all of the skus from the second list are on the first list so I only need to do the ones that occur on both lists. There are over 3000 on the first list and 14000 on the second. What is the fastest way to accomplish this.

I tried to sort so that all the sku's in both sheets are in the same order then copy and paste the price to the matching sku on the second sheet and then drag the price down through the sizes on the ones that have different sizes (not all of them do) but I know there must be a faster way.

For example:

Sheet one:
Sku Price
12345 $100
12346 $500
12444 $150
12347 $200

Sheet two:
Sku Price
12345
12345-5
12345-6
12345-7
12346
12444
12347
12347-5
12347-6
12347-7

View 7 Replies View Related

One Workbook - Copy Data To Different Sheets

Mar 6, 2014

I have a workbook (Sheet 1 contains - 6 columns and 1000's of rows). Column B has sensor type. Is there away to copy all data the deals with each sensor and paste it on a new sheet in the same workbook and name these new sheets by sensor type

Example
Date Sensor IP Address DNS Error
1/1/2014 Unix 1.1.10.10 fatty clock error
1/1/2014 HP 1.1.2.3 slim power isues

Please note I have over 50 sensor types.

View 4 Replies View Related

Copy Sheets Data To Another Workbook

Apr 16, 2009

I have workbook named "Distribution and Revenue" which is contained 14 sheets , which names are like "UB Distribution", "UB Revenue",
"SB Distribution", "SB Revenue". I want only all Revenue Sheets Data (leaving Last Row) to be copied to another workbook "F:DataFinal Result.xls" in sheet named All Revenue.


For example:

UB Revenue

BCDEFGHIJK2Product Quantity DetailProduct Revenue Detail3DateRTDPSETURTDPSETUTotal Revenue41-Apr-09 1,150 500 2 200 989 475 76 190 1,730 5Total:- 1,150 500 2 200 989 475 76 190 1,730 ............

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved