Creating A Macro Combine Reports (files) Into One
Mar 31, 2014
I have a hard time creating a macro from scratch I have 7 different excel files which im trying to create a macro that will combine all of this files (reports) into one, and then put the CT information (an excel file i have) on a separate tab within the 1 common report.
View 9 Replies
ADVERTISEMENT
Jul 19, 2012
I've been attempting to find a macro that would combine a number of similar workbooks into one large workbook. The files I'm dealing with are all .csv files with identical columns and headers.
I found one macro here: see below (this is the start of the macro) yet either I'm not using it correctly or there are errors in it as when I run it I get an error that says Run-time error '9' Subscript out of range and gives me the option to debug it. When I choose to debug it opens up the macro and has the following section highlighted?
Set wsMaster = ThisWorkbook.Sheets("Master") 'sheet report is built into
The macro in I found on this site begins with the following:
Option Explicit
Sub Consolidate()
'Author: Jerry Beaucaire'
'Date: 9/15/2009 (2007 compatible) (updated 4/29/2011)
'Summary: Merge files in a specific folder into one master sheet (stacked)
' Moves imported files into another folder
View 3 Replies
View Related
May 14, 2008
I am trying to create a report that takes two user inputs and looks them up on another worksheet in the workbook and returns the right value. As an example I have the user input a date and a job location and on another sheet there is also a date and a job location that has a population associated with it. Is there a way to return this information so that it changes whenever the user changes these two criteria
View 9 Replies
View Related
Jun 24, 2014
I am creating a report where there are multiple conditions and I am using MS Excel 2010.
Summary sheet will display
Date of Completion - If the exam has been taken already
In Progress - if the exam has been started but not yet completed
Not Started - if the exam has not yet been taken
Available data in Source sheet
Completion_Date - Date when the exam was taken or "Blank" if the exam is still In Progress
Completion_Status - Completed & In Progress only (all subjects that are not in the Source sheet shall be tagged as "Not Started"
View 4 Replies
View Related
Nov 2, 2011
it possible to create a pdf files using a macro?
I would like to take cells b5: j40 from sheets , W 1, W 2, W 3, W 4, & W 5 and place it on a pdf.
Is this doable?
View 2 Replies
View Related
Jan 28, 2014
I have a code that creates a zipped file that saves to the desktop. The macro works fine except it repeats itself and doesn't stop. How can I change the following code so that it only creates one zipped file?
Code:
Sub WhichButton()
Dim strDate As String, SavePath As String, sFName As String
Dim oApp As Object, iCtr As Long, I As Integer
[Code].....
View 1 Replies
View Related
Jul 11, 2014
i was wonder is there was any way I could go to the following website:
[URL]
and copy paste it into an excel sheet. What i would need is to get this page and the previous 7 days by changing the date "20140711" to "20140710" and so on. Each orevious day needs to be copy pasted to a different sheet.
As a new day occurs, I would like to delete the page 7 days ago and add the new day on a new sheet.
View 9 Replies
View Related
Feb 17, 2014
I have an expense workbook (Data) with 4 columns (ID, Item, Cost, Date). I would like to create macros that will generate 3 different reports and write to 3 different worksheets.
The first report is sorted and sum up the cost for each item. Please see the worksheet "Item".
The second report is sorted and sum up the cost for each part ID. Please see the worksheet "ID".
The third report is the cost for each month and Year-to-Date cost right next to it. Please see worksheet "Summary".
write the macros for each of these reports assuming that we don't know the number of rows in the "Data" worksheet.
View 4 Replies
View Related
Nov 21, 2006
I have a giant data sheet. I have to cherry pick certain data out of the list and send it to certain associates, in a new spreadsheet.
I want to do this automatically.
I can create the macro to select the data I want, and copy it over (values only), but I cannot find out how to do it in a new sheet with a new name that automatically gets generated with a unique filename (probably using the date).
Essentially, I want to copy my data spreadsheet (post-filter) into a new spreadsheet titled X mm-dd (where X is whatever I pick). I then want to delete several rows from it.
Ideally, the macro would do this (I will put a * next to things I can handle the code for, to save work):Filter Data *
Copy Data *
Create a New Spreadsheet named (Person's Name) mm-dd.xls
Paste Data (values, formats, column widths) to the new spreadsheet *
Delete Several Columns from the new spreadsheet *
Rename the sheet it's been pasted to
Re-filter data (new filter) *
Copy Data *
Paste Data (values, formats, column widths) to the same spreadsheet, only Sheet 2 *
Set the header of the spreadsheet with (Person's Name) and the date
Save the new spreadsheet
There will be as few as 1 sheet (in which case I would only want one worksheet in the new excel file), or as many as 4 sheets. I don't need a fancy way to do this, as it will only be done once a week, and I can just make the various cases required to do it even if it isn't pretty, but I can't figure out how to manipulate other files that haven't been created yet...
View 9 Replies
View Related
Mar 25, 2014
i am looking at creating a combine chart for 3 variables.how to achieve that?
TeamSubTeamsScore
A X 20
Y 25
B X 10
Y 20
C X 15
Y 10
View 3 Replies
View Related
Jan 23, 2009
I have a scenario here and i really dont even know where to start. If anyone can help me with some code for this project that would be great.
I have a folder that contains several subfolders (10-20). Within each subfolder is a number of excel files (the number of files varies) that contain 2 worksheets each.
What i am trying to arrive at is one file for each subfolder that has the first tab of each of the files. The original files contain links, so the values and formats must be pasted. It woul dbe great if all of the new files could be saved in the main folder among all of the subfolders.
It would be especially great if each tab could be named for its respective file and each new file for its respective folder.
View 6 Replies
View Related
May 17, 2003
My question is do u know any sort of program that can combine 100 xls Files (all has only one sheet ) to only one huge file in just one sheet !
and yes all the sheets having same no of columns and rows of data !!
View 9 Replies
View Related
Mar 17, 2007
I have about 60 excel files with same columns in each file. Is there a way to combine them together into one file (on the same sheet) besides copy and paste file by file manually?
View 9 Replies
View Related
Jun 28, 2014
I have multiple files in a folder.
The files are named:
File1.xls
File2.xls
File3.xls
....and so on; the number of files varies. I am trying to write a macro, to combine all *.xls files in one workbook having each file as a separate worksheet.
View 2 Replies
View Related
Mar 17, 2014
I need to use VBA read all historical data files, then, copy all the data from those files to Sheet[FX Historical Data] and Sheet[Position Data] respectively.
First, I copy a code from the text book, which allows me to copy one data files every time. Now, I have only 6 files need to copy, but if there are thousands of files? I try lots of codes but I still cannot find a way to solve my problem.
Second, can I use the function of "folder dialog open" to select the data files I want, and then copy the data inside to Sheet[FX Historical Data] and Sheet[Position Data]?
View 2 Replies
View Related
Mar 11, 2014
I'm using this Macro to merge 40+ reports. It works great except it keeps pulling the headers over.
This wouldn't be that big of a deal, except that for every report I merge I have to click "OK" approx 10 times because the lines have the same title.
Is there a way to prevent this?
Sub simpleXlsMerger()
Dim bookList As Workbook
Dim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As Object
Application.ScreenUpdating = False
Set mergeObj = CreateObject("Scripting.FileSystemObject")
'change folder path of excel files here
[Code] ......
View 5 Replies
View Related
Feb 26, 2014
adapt the code write by TURBO at [URL]....
I'm trying to add more sheets to consolidate the data from different worksheets
What I want it to do is to consolidate each worksheet in every excel file into one workbook that will have the same worksheet structures as the child files
If every excel file has {Sheet1,Sheet2,Sheet3} structure The Master Consolidated workbook should have the same structure but with all the date copied from the child excel files.
Attache it's also an example
Test xls files2.zip
View 5 Replies
View Related
Jun 27, 2013
I work for schools use data to guide teachers practices in the classroom. My main function is to mine down through data for kids that teachers focus on specific skills with specific children.
I start with a big conference each summer. By hand I combine, by student name, the data collected over the past school year. We then tear down to student levels setting goals based on statistical analysis. I need to combine across all of these csv files in a way that appends the data from each into one line per kid. I thought that 'vlookup' or 'index, match' might do it. I don't know.
View 14 Replies
View Related
Apr 12, 2007
I've pieced together code from a number of solutions on the forum and figured out how to find the files I need to process, but can't seem to figure out the code to actually combine/append each worksheet into a single one. I've searched the "sea of options" on this forum and managed to do one thing well. Pardon all my notes embedded in the code below, but if I don't do it that way, I'll only confuse myself further (which is easily accomplished) ... or lose my notes!
I’m going to run this code from an add-in menu, which is already created and working (yeaah!) … so (I think) I need to have the code either create a file named "Master (Combined).xls" in the target folder ... or ... have a file already created in MYFOLDER and have this code delete all but the header row when the file is opened(???) The "Master (Combined).xls" workbook needs to consist of one worksheet named "Master". I want it to open the current workbook (.foundfiles(i)), select all the data, and append it to the master workbook on the "Master" worksheet (sheet 1). The Master Worksheet in the Master Workbook needs to start out as a blank sheet ... except for the header row. I can add code to put the headers in at the start, if necessary
Sub g_CombineMultWB_AllXLSFiles()
' This Will combine all XLS files located in the
' S:DMSMSPOMSMaster POMS NIIN DataMaster EMALL Data FilesEMALL Excel Folder
' into a single worksheet in a newly created (or previously existing) workbook
'
' LOCATION OF FILES (ACTUAL):
' S:DMSMSPOMSMaster POMS NIIN DataMaster EMALL Data FilesEMALL Excel Folder
Dim i As Integer
Dim wbResults As Workbook
Dim wbCodeBook As Workbook
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
' Application.CutCopyMode = False ' DO I HAVE THIS HERE FOR A REASON???
On Error Resume Next
Set wbCodeBook = ThisWorkbook
Const MYFOLDER = "S:DMSMSPOMSMaster POMS NIIN DataMaster EMALL Data FilesEMALL Excel Folder"
With Application.FileSearch
.NewSearch
' Change path To suit.............................
View 9 Replies
View Related
Oct 22, 2013
Would like to be able to have a macro button or code that launches the Microstrategy Reports dialog box.
View 2 Replies
View Related
Apr 24, 2013
I receive 24,000 text files once a month that need to be combined into one csv/txt file and/or spreadsheet(tab).
About a year ago I posted a thread on the same topic which received a fantastic response from jindon that worked great
Unfortunately, the format in which the text files are ouput has changed, as has the filename layout. The files are now output with filenames such as:
(lic#, company name, displaying # records found, date, type.txt)
40298827_Windham Professionals Inc _Displaying records 1 through 10 of 100_041813_AGENTS.txt
40298827_Windham Professionals Inc _Displaying records 11 through 20 of 100_041813_AGENTS.txt
40303726_HEARTLAND CREDIT RESTORATION INC _EANF_041913_AGENTS.txt
(files with EANF in the filename have no records inside them and can be skipped)
While the contents of each file look like this: (see attached text file reference)
I would like to combine the contents of the text files while appending the lic#, company name and date from the filenames to each record so the resulting file looks like this:
40305196 Audette , Anthony Sales Provider 40298827 Windham Professionals Inc 041813
40313800 Burritt , Kimberly Sales Provider 40298827 Windham Professionals Inc 041813
As far as I can tell jindon's code is fine except the regex expression needs to be modified to handle the new layout, however that is far beyond me.
View 9 Replies
View Related
Mar 6, 2007
I have a looping macro in Excel using
"For Each Cell in Range ()"
where the range is a list of department names which produces a report
for each department. Instead of hard copy, I would like to produce
individual PDF files one per department, but can't find way of
changing the output file.
View 6 Replies
View Related
Jun 24, 2009
We are trying to automate the creation of PDF files for each sheet in an Excel file,a nd keep getting error messages. Can someone help? It produces the post script file, but it has no data nd then doesn't create a PDf file at all. We have Excel 2003, and have the below code setup.
View 10 Replies
View Related
Feb 21, 2010
I am trying to create CSV files from Excel spreadsheet for each tab. But when I convert these CSV files, text in cell is limiting to 255 characters, in otherwords it is getting truncated after 255characters. I am using Excel 2003 version.
And also when convereted these windows CSV files to UNIX csv files using the command "DOS2UNIX", some charaters becoming special characters. For exmaple, I have the actual text as "If AEENDTC ne '' then do; " and is becoming "If AEENDTC ne æÆ then do; " Do you have any idea why it is doing this.
View 14 Replies
View Related
May 9, 2012
My application has a information that is constantly displayed to operators. In one of the non-active sheets, is a log of what is happening and I need to export this log in a (prefereably) .html format to display on an Apache web server.
The monitored sheet always have to be visible, and I do not want any dialog boxes popping up, so the Sheets("log") has to be exported under this criteria... Only need the first 1010 rows exported to the html file.
Would all of that be possible?
View 7 Replies
View Related
Dec 7, 2006
I have a problem with the code below. When i place the statement "MsgBox ("Done at " & Tester_array(N))", i am able to get the files i need. However, when i remove this statement, no files can be retrieved. Why is that so? Can somebody advise ?
Option Explicit
Sub File_Transfer()
Dim N As Integer
Dim fs As FileSystemObject
Dim A As TextStream
Dim Lotid As Variant
Dim Testerid As Variant
Dim dRetVal As Variant
Dim Tester_array(1 To 15) As String
Tester_array(1) = "aaa"
Tester_array(2) = "bbb"
Tester_array(3) = "ccc"
Tester_array(4) = "ddd".......................
View 2 Replies
View Related
Nov 24, 2009
I have forms filled out by many, and I need to compile the information in it to create a list in my summary.
Is that possible?
fortunatly, the information always resides in the same cell on every file.
View 7 Replies
View Related
Nov 17, 2007
I am sure the answer to this is out there somewhere but I haven't been able to find it. Thank you in advance for the help - I just can't figure it out.
I have several identically formatted worksheets (for different departments) with macros that reorganize the data in each sheet. I also have a list of managers with their respective departments in this same workbook.
I want a macro that will save these department sheets (values and formats only) in new workbooks - the manager's name - according to the list. I also need the macros that reorganize the data to work without referencing the original file.
View 6 Replies
View Related
Jan 1, 2009
I have posted about creating an Excel worksheet which would help determine proper entry into a retirement plan. Another idea that I had entailed setting up a separate worksheet which would return the dates of entry following an employee's date of hire. Therefore, an employee hired on 8/5/2005 would have dates of entry following that stand at 1/1/2006 and 7/1/2006. Then, I had an idea of creating a formula or function to add up the number of hours that the employee had worked.
Setting up a separate worksheet with the number of hours that an employee worked during the initial eligiblity computation period and the subsequent computation periods (separate respective columns for the initial eligibility computation period and then for each subsequent computation period) would help. I would calculate using sum functions.
So, to sketch this out:
One sheet would have the employee's DOH
Another worksheet would have the Dates of Entry subsequent to that DOH (e.g. for an employee hired 8/5/2005 the next Dates of Entry entails 1/1/2006, 7/1/2006, and 1/1/2007)
Yet Another Worksheet would sum the total hours that an employee had worked since DOH on a month by month basis (i.e. the total number of hours than employee had worked since his or her DOH up to a certain point on a monthly basis; e.g. an employee hired on 8/5/2005 would have on the sheet the calculation of the hours this employee had worked as of from 8/5/2005 to 9/1/2005, then the next column would have the total the number of hours worked by the employee from 8/5/2005 to 10/1/2005, etc.)
Finally, the worksheet with the DOH information would have a column which would (this would probably entail heavy use of VLOOKUP) snag the information as to how many months and years an employee had worked as of the subsequent Dates of Entry; if the employee had worked 1,000 hours and 12 months as of 1/1/2007, for example, the employee would enter the plan.
To explain the situation further:
The employee must work 1,000 hours during his or her initial eligibility computation period. That starts on the day of the first hour that an employee works for the company. So, an employee hired on August 1, 2005 who worked one hour on that day must 1,000 hours from then till August 1, 2006 to enter the plan as soon as possible. If the employee did not work 1,000 hours during that period, then the eligibility computation period shifts to the plan year. So, if the employee did not work 1,000 hours between August 1, 2005 and August 1, 2006, but did work 1,000 hours between January 1, 2006 and December 31, 2006 (this of course presumes the plan operates on a calendar year)
View 11 Replies
View Related
Jun 24, 2013
I have the following function:
=IF(AND(I17>=$I$1,O17>=$O$1,Q17>=$Q$1,F17
View 2 Replies
View Related