Compiling Variable Range From Multiple Workbooks Into 1 Single Worksheet

Aug 1, 2014

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.

View 14 Replies


Dividing Single Worksheet Into Multiple Workbooks

May 31, 2012

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
End With

View 3 Replies View Related

Copy Common Cells And Variable Range From Multiple Worksheets To Single Master Workbook

Apr 2, 2014

Basically, i have a common workbook template that is used by multiple users across the business to request a cost for numerous new products.

Within the template, there is a common section at the top, where specific project information is entered. There is also a table beneath where 1 or many products can be entered, with specific information relating to that product in the same row.

All the submitted requests are uploaded via an email attachment, to a particular sharepoint directory.

What i would like to do in the master workbook is the following:-

1. Open in turn every uploaded workbook within the sharepoint directory and copy the following cells into the master workbook, each in it's own row (or next available), with the data in adjacent cells.... 1st cell to enter data is $B6.

Cells to copy from each sheet:

Common info contained within cells:

Product specific info: $U37, $AD37, $AH37, $DH37, $C37, $O37

Depending on the number of products requested, we need to repeat (loop?) until it finds the next blank row in the table. I have hidden a blank row in the table, so there will always be one!

All of the common information needs to be included for each product specific entry.

For each file, once the upload has been completed, i would like the file to be moved to another "archive" directory.

I have attached the template for information. The master workbook is still in development so can't share currently.

View 12 Replies View Related

Import Set Range From Multiple Files Into Single Worksheet

Jul 30, 2009

I've got a single folder for the year 2009 that contains multiple files, identical in nature but updated for each business-day. In other words, the same report is generated daily with updated info. The naming convention is the same for every file (i.e. Daily Net Debt Report 02.2.2009.xls)

My ultimate goal is to have a macro that is dynamic enough that if its run on any given day of the year, it pulls the data (specifically from the worksheet "Detailed Cash" cells C1:E26) from every file included in the folder and places it in a single worksheet in the master file. So, for example, data from 1/2/09 would go into cells A1:C26, data from 1/3/09 would go into cells D1:F26, etc...

View 7 Replies View Related

Multiple Workbooks Into Single Sheet

Jan 7, 2013

I can find tons of examples to merge many worbooks into one workbook(retaining all sheets) but I would like to merge to one continuous sheet.


Folder c:excel containes 5-10 workbooks. Merge sheet2 of all workbooks in that directory to sheet1 of new workbook.

All sheet2's have same name of "Sheet2" and all have same fields. Also there are no blank rows but each contains different # of rows and plz dont say JFGI (just __ google it) I have been.

View 3 Replies View Related

Reassemble Multiple Workbooks Into Single Workbook?

Feb 13, 2014

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.

View 2 Replies View Related

Create Multiple Workbooks From A Single Workbook

Jun 3, 2009

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".

View 7 Replies View Related

Combine Multiple Workbooks Into One Single Workbook

Feb 21, 2010

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 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 .....

View 9 Replies View Related

Extract Single One Cell Value From Multiple Closed Workbooks

Mar 23, 2012

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.

Column AColumn BFile NameH19 ValueDallas.xlsmSan Diego.xlsmArgentina.xlsmParis.xlsm

View 3 Replies View Related

Create Multiple Workbooks With Data From Single Workbook

Mar 18, 2014

I have a TEMPLATE workbook that has 106 cells (all in the same worksheet) that need to have data input in them.

I have a separate DATA workbook with 3,000 rows of data, each row has 106 columns that correspond to the cells in the TEMPLATE workbook.

I need to create 3,000 new workbooks that are populated with the data from the DATA workbook.

View 3 Replies View Related

Copy Data From Multiple Workbooks To Single Workbook In Another Location Using VBA

Jun 10, 2014

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.

View 3 Replies View Related

Create Multiple Workbooks From One Single Workbook Based On Customer Code?

Jul 6, 2008

I have an excel file which contains following data in it.

Col-A Col-B Col-C ......
Cust Cd Name Sales
101 AAA 1000
101 AAA 500
101 AAA 3000
102 BBB 800
102 BBB 200
103 CCC 200
103 CCC 200
103 CCC 200

I need to create following three workbooks with name based on Cust Cd from above excel file.

Workbook - 1 : 101.xls which contains records only pertaining to Cust Cd 101.

Workbook - 2 : 102.xls which contains records only pertaining to Cust Cd 102.

Workbook - 3 : 103.xls which contains records only pertaining to Cust Cd 103.

View 4 Replies View Related

Open Multiple Workbooks With Variable Names

Aug 17, 2007

I have data spanning many files which are named with the date on which they were created (so there are 31 files for August).
For example:
PL080107, PL080207, PL080307, PL080407...)

I'm trying to compile all of my data into one workbook, and have the macro to append each file to a list. Now I need the macro to either OPEN each file, or ACTIVATE each file so that the rest of the Macro can grab the necessary data.

I say Open or Activate, because I can MANUALLY Open a full month's worth of files if it's easier code. If not, I would like it to open and close each workbook on its own.

I have over 7 month's worth, so opening 31 files 7 times is better than opening over 200 files individually!

View 5 Replies View Related

Set Variable To Named Range Or Single Cell

Nov 30, 2008

The problem exists with the lists I use. I have a "settings" sheet, where users can choose from preset values to run in the program. E.g. "Urgent", "Semi Urgent" and "Non Urgent" (there are a lot more values, but those will do for now." and the idea is to run them 1 at a time.

However, I've now determined that 99% of the time, they're going to be run 1 after another, that is to say run the program once for "Urgent", then again for "Semi Urgent" and then again for "Non Urgent". So I'd like to loop through these. Again, not a problem, you'd think.

So I added a new value to the list; "All" which users can select to invoke a list. Again, not a problem, I already have the list as a named range, "DmgList" and I can cycle through it. I ran the following test code to see if it would work in theory...

View 4 Replies View Related

VBA Code Error - Extract Data From Multiple Workbooks To Single Excel Spreadsheet

Mar 28, 2014

I have a folder with multiples excel sheets

Destination : C: Project CustomerExcel

I would like to extract and compile the information contained in these cells:
a5,c5,a6,c6,c7,a14,g14,e16,g16,e18,i18,a20,g20,h22,j22,h24,l24 all the sheets.

New sheet would contain the information of each sheet eg. Column A2= file name

And Row B2 to R2 or whatever will be the corresponding cells mentioned above for each cell. The code I have only brings back the file name but only a5 from the range but not the rest.

Sub MergeAllWorkbooks()
Dim SummarySheet As Worksheet
Dim FolderPath As String
Dim NRow As Long
Dim FileName As String
Dim WorkBk As Workbook
Dim SourceRange As Range

[Code] .....

View 5 Replies View Related

Excel 2010 :: Merging Data From Multiple Workbooks To Single Master Book?

Feb 16, 2012

We have a master worksheet, and I cant let staff see it, but I want them to update 'their bits' themselves, rather than email the admin staff and let them update the master sheet..

every job is on its own row and contains a unique ID.

is there a way i can merge their data in to the correct row and column(s) on the master sheet?

i've been playing with datasources etc

Excel 2010

View 2 Replies View Related

Excel 2007 :: Variable References To Multiple Workbooks?

Jan 10, 2012

i make a lot of "trending" files at work where i link a cell to a seperate workbook where all workbooks are in the same folder.

these workbooks all have the same name with the date at the end

workbook 06-01-2011
workbook 06-02-2011
all the way to
workbook 12-31-2011

usually i use find replace to change the date one at a time, but doing that 365 (x how many cells i have referencing) times is redundant

i have seein INDIRECT of the cell changes but nothing for the workbook name chaning

here is what i am trying to do:
='C:File Path[WorkbookX.xls]Sheet1'!A1
where the X WorkbookX is variable (the date at end of file name)

i have a list of all workbook names or just the dates and would like to do something like:

where D1 is the full path name
='C:File Path[Workbook"D1".xls]Sheet1'!A1
where D1 is the date name

using excel 07 i prefer not to use a macro for how i am doing this but if a macro is the only way then i cannot have it actually open the files to pull the data. i prefer no macro since i set it up for future dates so when the new file is created it automatically updates the reference.

my end result i usually have something like A1=referenced cell from first workbook, A2= cell from 2nd book, etc. sometimes B1 would = a different cell from first workbook and so on if i am trending multiple cells from the workbooks

View 1 Replies View Related

Copy Single Cell Into Variable Range Of Cells

Dec 3, 2013

I would like to copy a cell in v2 to from v3 to end of column v where there are values in column u.

View 4 Replies View Related

Compiling Data From Few Worksheets To 1 Worksheet?

May 13, 2014

I have 3 different sheets with data that I want to combine into one sheet using a formula. Here is an example:

Sheet A
Date Amount
10/1 $5
10/2 $10
10/7 $5

Sheet B
Date Amount
10/2 $7
10/3 $10

Sheet C
Date Amount
10/5 $5
10/6 $10

I want a fourth sheet that fills with all the data from these three sheets. Ideally it would be in order by date, but I understand that might not be possible. So the last sheet should look like this:

Date Amount
10/1 $5
10/2 $10
10/2 $7
10/3 $10
10/5 $5
10/6 $10
10/7 $5

The reason I want to use a formula of some sort is because if I add more rows to sheet A for example, I want the fourth sheet to automatically add it (whether it's possible to do in date order or not).

View 2 Replies View Related

Consolidate In Excel VBA For Multiple Variable Length Sheets In Single Workbook

Jun 30, 2014

my macro comes up with an error on the Consolidate line that says 'Cannot add duplicate source reference'. I have a workbook with a variable number of tabs and I want to consolidate-sum (not copy and paste) the data from the various sheets onto a summary sheet within the same workbook. I'm at the point where it all works fine until it hits Consolidate.

Option Explicit
Sub ConsolidateExport()
' ConsolidateExport Macro


View 1 Replies View Related

Copy Multiple Columns In Multiple Workbooks Into Separate Worksheet?

Feb 27, 2014

The following code won't let me copy from the first workbook. I get a run time 1004 error stating "That command cannot be used on multiple selections".

I would rather not have to copy this by column for each of the 4 workbooks


View 6 Replies View Related

Paste Method When Compiling Data Into Master Worksheet

May 6, 2014

Here is my code thus far - it seems to go through the directory and copy data (single columns of 101 data-points) from the workbooks, but does not successfully paste it into the master-workbook (error message reads: 'paste method of worksheet class failed').

Sub LoopThroughDirectory()
Dim MyFile As String
Dim ecolumn
MyFile = Dir("C:Documents and SettingskbriemMy DocumentsErindi_i_vinnsluEXCELprufa1")

[Code] ....

View 3 Replies View Related

Compiling From Multiple Sheets Into One

Aug 10, 2006

I have several tabs in a spready, and I want to be able to compile a range of cells from each tab (constant selection of cells from each tab) together as a list in a new sheet.

The list needs to be able to be populated in any order and with repetition.

I'm thinking some sort of sheet for selecting which tabs to bring in info from would be useful, and then a command button to compile all the info into one list on a new tab...but I have no idea how to write the code for it!

View 3 Replies View Related

Compiling Table From Multiple Worksheets

Mar 6, 2012

I have a file with 26 worksheets, each have four columns and the last column is averaged at the bottom, and I'd like to make a summary worksheet tab showing the name of the table, the number of records, and the average score of all 26 sheets.

The problem is, some worksheets have 20 rows, some have 1400 rows. I could go choose the data manually, but isn't there an easier way to do this?

The table name is merge/centered across the four columns, and is the worksheet name (using a formula I found on here). Then the four columns have headers, then data. The last row of each worksheet doesn't have the normal data in it, but says "Records Counted," then has a COUNT of the rows, then has "Average," then has an average of the column above.

View 1 Replies View Related

Compiling Data From Multiple Tabs

Sep 3, 2013

I've been asked to compile and sum weekly sales data. The problem is that the data was supplied in 52 separate tabs, for each week of the year (I don't know who on earth thought that would be the most appropriate way to send the data).

Is there any quick way to import all the data from each tab into one worksheet? The data is laid out the exact same way on each tab. All the row and column headings are the same, and in the same cells. Only the numbers are different (obviously).

View 2 Replies View Related

Sum Variable Range Of Numbers From Worksheet Without Activating Worksheet

Apr 29, 2013

I care about is the line starting wks4.Cells(Di, 2) = I am trying to sum data from a variable length column in worksheet 3 and place the result in column 4 However, when I hit enter after entering the formula into =SUM() I get

Compile Error:

Expected: list separator or )

Sub Macro1()
Dim wks3 As Worksheet Dim wks4 As Worksheet
Set wks3 = Worksheets("Sheet3")


View 4 Replies View Related

Combine Multiple Workbooks Into One Worksheet

May 8, 2013

I have a set of excel files that I need to combine into one worksheet. The files have the same number of rows but the number of column will vary. The combined worksheet needs to have the data from each workbook appended to the last column.




Question 1

Question 2

[Code] ........

View 5 Replies View Related

Copy A Worksheet From Multiple Workbooks

Feb 12, 2009

i have a group of workbooks all housed in the same folder 'ro24_ws' - who's path is -


what i am looking for is some code to copy a worksheet named 'ro24' from each workbook within this folder into a single workbook

View 9 Replies View Related

Single And Multiple Choice Dropdowns In Same Worksheet

Mar 23, 2012

I've finally figured out the correct code to allow multiple selections from one of my drop down lists. Now, when I try selecting an item from a separate list (which I only want to be able to choose one thing), it's accepting multiple items. How do I have both working properly?

This is the code I have for my multiple selection list (which is only in column M):

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngDV As Range
Dim oldVal As String
Dim newVal As String
If Target.Count > 1 Then GoTo exitHandler
On Error Resume Next


View 2 Replies View Related

Return Multiple Lines From Workbooks Onto On Worksheet

Jan 21, 2009

I looking at attempting to combine 26 spreadsheets all into one with a macro. Basically i have 26 spreadsheets detailing all items placed into different suspesne accounts, these are on going so they can be up to 2000 lines long. All 26 spreadsheets are contained in one folder with a backup of each.

Columns B - F detail the payment being applied.
Columns G - J detail the payment being removed.

I was hoping the would be a way for a macro to look into each one and if there is data in column E (value) and not in column I (vlaue removed) then return the whole line onto a new worksheet. So basically after i have run the macro i would have one worksheet with all outstanding items on instead of having to open each one and copy and pasting.

The lines will always vary on each workbook as to where the outstanding payments is and im using excel 2003.

View 9 Replies View Related

Copyrights 2005-15, All rights reserved