On a weekly basis, I receive a single worksheet in a workbook that contains ~30,000 rows of product sales.
Row one contains column headings that is unique to all other rows. Column A contains the store number that sold the product. There are ~50 unique store numbers.
I am trying to create a macro that will break the report up into seperate workbooks.
For example, assume in column A there are 30 rows of data for 3 different store numbers (say store 112, 386, & 798, each with 10 rows of data). I want to create 3 new workbooks and include the same column heading for each. For example, name new workbooks as follows: "Store 112", "Store 386", "Store 798".
I have a series of workbooks which will be completed by different people and emailed back to me and I am looking for a macro that can take them all (they will all be located in the same folder) and reassemble them, so that:
a) the header row (which is the same on each sheet) only appears once in row 1 b) the drop downs and formula remain intact throughout on the reassembled sheet
I've attached some sample sheets, basically I would receive back the sheets, North, South, East and West (although they wouldn't be called that) and I would like to be able to run a macro that results in the sheet called 'All', which maintains the dropdowns and formula. I could either start with a blank sheet for the reassembly or a sheet that only has the header row, either could work.
I am trying to combine ~300 workbooks into one single workbook. All 300 workbooks have the exact same header. I tried using the code from thread http://www.excelforum.com/showthread.php?p=696435 but nothing is being copied over. The only difference between my example and the other is I only need to take data from the first sheet in each data workbook. All the workbooks are located in following directory .....
I have a folder which contains multiple 'Customer' workbooks (example attachment 'Customer_001'). Each workbook has a filename unique to the customer (Customer_001, Customer_002, Customer_117 etc). The workbooks contain a single sheet with customer information and answers to questions. These 'Customer' workbooks are automatically saved into a folder once the customer completes a Userform and clicks 'save'. Potentially, there could be 100's of customers' workbooks saved in the folder, each with their own unique filename.
I also have a 'Master' sheet saved in a different folder (example attachment 'Master'). The 'Master' workbook has multiple sheets named 'Department 1' and 'Department 2'. The purpose of the master sheet is to consolidate all information from the individual customers' workbooks.
Specifically, I would like a command button on the 'Master' workbook to execute the following tasks...
1. Copy the data from range A3:F3 from each of the 'Customer' workbooks held in the folder. 2. Paste the data into the next blank row on the 'Department 1' sheet in the 'Master' workbook.
3. Copy the data from range A7:F7 from each of the 'Customer' workbooks held in the folder. 4. Paste the data into the next blank row on the 'Department 2' sheet in the 'Master' workbook.
5. Save the 'Master' workbook. 6. Delete all 'Customer' workbooks in the folder.
I need to consolidate a lot of information from multiple workbooks all the workbooks are located in a folder, i am not bothered about running each one separately or a group at a time, each work book has ten sheets with each sheet in the workbook being different, it needs to add to the next blank row on each sheet.
VBA Macro to work through a worksheet that consist of static data (tab 4) cost centres and to populate a new work book per cost centre consisting of three tabs for every cost centre found in the static data.
The master Workbook has the following tabs:
Tab 1 is called travel and consist of column a which is the cost centre number (plus 14 other columns)
Tab 2 is called Mobile and consist of column a which is the cost centre number (plus 14 other columns)
Tab 3 is called Expenses. and consist of column a which is the cost centre number (plus 14 other columns)
Tab 4 Static Date column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns).
If no information found on a specific cost centre, the tab will include the headers and return the words "No transactions for this period"
Whilst splitting data into Tabs the workbooks should check against the Static Data table and include cost center description in Column B of each tab in the new workbook.
If master workbook consist of the following....
Tab 1 is called travel and consist of column 1 which is the cost centre number (plus 14 other columns), cost centres, 555,557,
Tab 2 is called Mobile column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns) cost centres, 555, 78689,
Tab 3 is called Expenses. column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns), cost centres, 555,
tab 4 Static Date - column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns). cost centres, 555, 557,78689
It should output 3 workbooks by cost centre number.
One for 555, which consists of 3 tabs, travel, mobile and expenses.
A second for 557 which has 3 tabs travel, mobile and expenses, but only with data in the travel tab.
A third for 78689 which has 3 tabs travel, mobile and expenses, but only with data for mobile data.
The workbooks will be replicates of the contents within the tabs where column a wil be the cost centre plus 14 additional columns.
Macro to collate four workbooks into single workbook.
Sheets in workbooks also to be copied. The sheet 1 of the 4 workbooks should be combined into the sheet 1 of the new workbook. Sheet 2 of the 4 workbooks should be combined into the sheet 2 of the new workbook, and so on.
I have around 21 excel files in a particular folder all the files column headings are same and but number of line differ from 0 to 50K. Overall all 21 files will have more then 2 Lakhs lines.
i require a code which consolidate the all 21 files in to single workbook. if first sheet in full then data should copy to next sheet, so on. I also require file name in the first column of destination file when files are being copied.
I need to import the data from a specific sheet (same named sheet on all closed workbooks) to a sheet in an open workbook. All the columns are identical in every workbook but the number of rows is variable, so the data from each subsequent workbook must be appended to the end of the current data.
Whenever a button is pressed, this macro will clear the sheet, then import the data starting in A3. The workbooks are in different folders but they all have the same name, so some sort of explorer window will probably be needed to actually select each file.
I have a worksheet in excel that has financial data for several departments and schools. The data is across 2 columns and 948 rows. I need to break the data down into multiple workbooks so I can use and existing email macro to send them to managers. There is a unique character that separates the data and I was able to use a previously written macro to enter page breaks which is below, but I'm having trouble using the same unique character (or page break) to put the data into separate workbooks.
Dim PBRange As Range, PB As Range With ActiveSheet Set PBRange = .Range("A1:A1000") For Each PB In PBRange If PB.Value = "***********" Then .HPageBreaks.Add before:=PB End If Next End With
I have a little over 100 workbooks which I will receive back from customers and in column A of another workbook I have the names of those workbooks.
Not all workbooks will come in at the same time, but I would like, as we receive the workbooks, retrieve the value from cell H19 from the available workbooks according to the name in column A and place the value in column B.
I've looked into Indirect, but with this function the workbooks have to be open. If one of the workbooks has not been received, I would like for the macro to skip this file name. All files are .xlsm.
The file will be in the same folder as all the individual workbooks.
I have several workbooks (5) with the same variables (columns- A:Q) but with a changing amount of rows (2:n, not including the headers). Each row corresponds to a date range (usually a week) for a particular person (up to 40 people) plus a few other values.
I would like to have a way of "merging" or "compiling" the 5 "seed" workbooks into 1 "master" worksheet. Where rows 2:n of each of the 5 "seed" workbooks are added to the master without any duplication of the same name-date range combination. Also, the master worksheet should not include the rows which only contain a name and date range but for which all the other variables are zero or missing.
Each "seed" workbook would have a button that sends the data over to the "master" worksheet.
Is this a really difficult project? Feasible for someone with near to zero VBA experience?
I attached 3 files to show you what I mean. The 2 "seed" files are merged into the "master" file. Please note that in the files only 2 names are used, but the "seed" files could contain any combination of 40 some names. Also note that the length of rows which contains data in the "seed" files is variable, although it should not be longer than 16 rows + the header row.
I'm trying to create a single array from multiple ranges... I'm not sure what syntax to use:
Code: Dim dat4() As Variant Set r = Sheet13.Range("rsqlassetid") Set r2 = Sheet13.Range("rsqlparentcat") dat4() = (r , r2)
I can create an array with multiple columns from a range if the columns are next to each other but in this instance they're not.
These 2 ranges both have the same number of rows and I'm trying to combine them into a 2 column array, but not sure how to make it work without looping, rediming the array and using a secondary array to preserve the data...
cubspline(Xval As Double, XRange As range, YRange As Range) As Double
The problem is that XRange (and also YRange) is in different areas of the spreadsheet. I want to combine these areas into one range which I can pass on to the cubspline function. What is the easiest way of doing it? I'm looking for something like a "union" function for ranges in Excel.
I have about 20 workbooks with different file names for different projects all saved in the same folder. Each workbook has about 10 worksheets and each worksheet is named in a similar fashion in each of the 20 workbooks (eg. revenue, cost, variance etc.). I want to pull out a worksheet named ' forecast' from each workbook into a master workbook so that the master workbook would contain the 20 forecast worksheets.
I expect to deploy over 200 iterations of a workbook (templates if you will) containing a mix of up to one hundred different attributes each with its own list of valid values. My problem is the attributes don't always default to the same column in every template workbook. Therefore, to make things easier for users I would like to create attribute valid value dropdown lists on the fly using the "Valid Values' table as the source data (see the attached). Since the attribute names will be the same from one template workbook to the next, I wanted to come up with a macro that would reference a source table (a separate workbook) containing all valid values for all attributes which users would be required to download to their local machine.
See the attached example workbooks and an example of a "Valid Values" list. Here's what needs to happen: When a user opens template workbook #1 I need drop down lists containing the valid values for the attributes contained in cell B3 (User Code),C3 (Department) and D3 (Category). Likewise, when another user opens template workbook #2, I need drop down lists containing the valid values in cell B2 (Department), C3 (Group), D3 (Category), E3 (Level), F3 (Material) and G3 (User Code). Notice that "Department", "Category" and "User Code" are data elements common between both workbooks but resident in different columns.
This is a relatively long list - 1000's. What I'd like to do is create a macro that sorts by brand, and at every change in Brand, copy the user details (Username, firstname, lastname, email) to another workbook with those labels at the top of the table. Upon completion, it saves the workbook with the name of the appropriate brand.
E.g. I'd have 3 workbooks: - BrandA.xlsx - with the 2 user listed - BrandB.xlsx - with the 1 user listed - BrandC.xlsx - with the 1 user listed
I have a database from which I extract 5 different excel files. For arguments sake, they are called File 1, File 2 etc. Each of these workbooks will have a sheet called 'Raw Data'. These will all be save in the one directory, C:Data, for example.
I am after a macro that can copy all the data from each of the workbooks, on the sheets called 'Raw Data, however the data in each of the workbooks will vary in length and width.
The workbook which I want them copied to is called "Template" and I would like the copied data onto separate sheets in this file. If possible I would like them copied to already named sheets, for example in the "Template" file, sheets may be called "Raw Data1", "Raw Data2" etc.