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 still have a problem with consolidation of workbooks.
I am working in HQ and at the end of each month, every branch under my care will submit an excel workbook to me. Inside this are two worksheets (worksheet 1 and worksheet 2 for convenience). Both have standard headers and rows and rows of data. Upon receipt, I will keep all these files in a folder called "Oct06" (and Nov06 etc for future mths)
I'm not able to find an easy way to consolidate all the various worksheet 1 into one master worksheet. I need this so as to generate a pivot table. At the same time, I need to consolidate all the worksheet 2 also for the same purpose.
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 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.
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 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 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 am having some 60+ workbooks in which the end-users are entering data. Each workbook is protected with different passwords.
We have the systems networked. The main compilation file is in the server D:MAIN folder. The workbooks for users are in D:Mainusers sub-folder. The files in users folder are only allowed to have access by the users.
Now, in the compilation sheet I have linked the data from all the individual files (which is in its subfolder). I am facing a trouble that the excel asks password for each and every workbook to update the links in the compilation workbook.
Any possibility to overcome this trouble? A VBA code is the solution? or any other alternative measure is there to solve?
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've got folder of 44 files - all copies of each other apart from the data entered in the cells - which have 7 worksheets in them all named differently (Each one is a different day of the week - this is the work of someone else that I have to work on !).
I want to copy the data in the columns A-R of each worksheet from row 2 to the last one with data in column M into a single file so that I can then then work on all that data in a single file..
I'm trying to find a way to save a single sheet of an excel workbook and in the same process delete all vba code and shapes from the new single sheet workbook. I was looking around and found this code which does save only the single sheet to a new one sheet workbook but doesn't delete the vba and shape that I have used to assign macros to in the original.
Code: Sub SaveSheetAsNewBook() Dim wb As Workbook Dim InitFileName As String Dim fileSaveName As String Dim wshape As Shape InitFileName = ThisWorkbook.Path & Format(Date, "mm.dd.yy")
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 have the following macro in my spreadsheet to extract specific data from closed workbooks in a folder. It works great but what I would like to do is make it so I can just open the spreadsheet and press a button I create that will extract the data from the folder that it lies in.
Currently I have this specific spreadsheet just sitting by itself and I manually work out the address of where my spreadsheets lie and add that address into the code and run the macro. I find it a little cumbersome and me not knowing a hell of a lot in VBA don't know what the command is to make it pull the data from the folder that it resides in. Once I do this then I can create a button and assign the macro to it. Can change the code to be able to extract the data from all of the workbooks in the folder that the macro enabled spreadsheet lies?
how to merge different workbook in a single excel workbook. E.g. letus one workbook name is ram and another is shyam i want to merge both and make another workbook in excel like ram or shyam or another s..
I have 7 different files that each contain one sheet. Each sheet has the same headers/data types in columns A:H, but may be any different number of rows in length. I need a macro that goes through each file and copies cells A2 through H of the last row of data and pastes them all into my master sheet ("Timesheets") where the macro will be stored. My problem is that I want all the data from File1 to be pasted, then all the data from File2 to be pasted at the next empty row, and so on. I also need to include a way to tell the macro to move on if a file is not found.
The spreadsheet contains 8 worksheets, of which I am only concerned with 7 as the 8th merely presents a graph.
The first 6 worksheets all contain raw data exported from BMC Remedy indicating the names of users who logged incidents to have their passwords reset or their AD Accounts unlocked over a 6 month period, hence 6 worksheets (per month basis).
The 7th worksheet contains raw data from another application known as FIM (A MS based interface which allows users to reset their own passwords) indicating all users who are registered to utilize this functionality.
The goal of my exercise is to consolidate the data and sort it to such an extent where I can ascertain which users phoned the service desk to log an incident for a password reset, even though they are registered to do it themselves via FIM ... I have been going through the list manually and it took me 10 solid hours to go through 265 ... ... ... ... I have 3'900 to go through!
I have many sheets in an excel workbook. Each sheet contains some data. I want data of all sheets into one sheet in the same workbook. The data of sheet 3 should appear below the data of sheet 2 & so on. I leave the first sheet of the workbook blank so that data of remaining sheets can be consolidated in the first sheet. Therefore I wrote the following code:
Public Sub consolsheets() Dim a As Integer Dim rng, rng2 As Range a = a + 1 For a = 2 To Worksheets.Count Worksheets(a).Activate Set rng = Worksheets(a).UsedRange rng.Copy
Data of row 3 of sheet 2 (ccccc) is overwritten by data of row 1 sheet 3 (11111). Similarly, data of row 3 of sheet 3 (33333) is overwritten by data of row 1 of sheet 4 (@@@@@).
This problem is not faced if the sheet 1(blank sheet) has some data.
I have let's say 3 workbooks with 1 sheet in every book. Sheet in first wb named "SD_Romania". It looks like this:
Sheets in other workbooks named "SD_Bulgaria" and "SD_Poland" (there are more than 3 workbooks, just an example).
What I need to do is to write a macro that can extract only "Outlook" row data from all books and worksheets into new workbook. So that data will be structured like this:
BM and KF_TYPE are constants. REG should be taken from worksheet name. VERSION should be taken from A1 column (3 chars, starting from 8 char). Period should somehow be transformed from "March 2008" to "32008".
The macro should look search for information in all opened workbooks, regardless of their names.
This is a hard macro, I guess. But unfortunately I don't have a clue how to write vba macros