Transferring Rows Of Multiple Data Between Workbooks
Jun 26, 2014
I have two workbooks with similar columns (note: both workbooks may not have all the same columns, but for the same columns, the names are written identically in both workbooks). I'll walk through what's in each sample workbook I've provided and what I am hoping to accomplish.
Transfer Rows1: This workbook contains multiple rows of data for one company or ID (For example, Client "A Co" has 4 rows of data.)
Transfer Rows2: Contains some of the same columns as workbook 1, but not exactly in the same order.
What I want to do is take all the multiple row data for an ID in Transfer Rows1 and put the information as a single row in Transfer Rows2. So, Client "A Co" in Workbook 1 has 4 rows, but in Workbook 2 will have 1 row. It's matching columns, essentially. Columns that are present in both workbooks should have the data filled out in only ONE row in Transfer Rows2.
As far as cost is concerned, Cost A in Transfer Rows2 is just the sum of all the Cost A's for a particular ID Number in Transfer Rows1 (same for Cost B and Cost C).
I also want the installation date in Transfer Rows2 to be the latest installation date for each unique ID from Transfer Rows1.
Also, a particular client can have multiple CID's. This appears in different rows in Transfer Rows1, but should appear in one row, multiple columns (again, for each unique ID) in Transfer Rows2.
Notice, the column 'Products' in Workbook 1 is not in Workbook 2, and that's because each row for column may have different information and thus I would not be able to transfer it into a single row in workbook 2.
TransferRows1 is where I am right now and I have filled out TransferRows2 to indicate what I hope to accomplish. I am posting here because the actual set I am working is fairly large, on the order of ~ 35,000 rows and need to automate this process using code instead having to copy and paste thousands of times.
View 2 Replies
ADVERTISEMENT
Aug 5, 2014
Itransferring data across two work books I have.
Every month I get sent sales figures of products, from now I have been typing in every sales figure which is long and boring. So I was wondering whether there is a way to make excel match the products on each workbook (mine and the one I get sent) seeing as there is a product number on both workbooks and then have excel automatically fill in the field I type manually which are quantity and value. So excel would see on the one workbook that product X has sold 10 units with 1000 value and then would go across to my workbook and fill that in the area I need on mine matching from the product code?
View 6 Replies
View Related
Jan 4, 2007
I have create a nice invoice with macros to random insert pages and summations etc. Works fine, but to complete it I want to go one step further and there ìt got out of hand.
I want to create the following, but I can not get al this combined in two Macros.
Basis: Workbook 1 = Invoice, Workbook 2 = Invoicelist
Required actions Macro1:
1. Starting point is that Workbook “Invoice” is open.
2. The user activates Macro1.
3. Check if Workbook “Invoicelist” is active.
4A. If YES then continue,
4B. If NOT then reply with some sort of Alertbox “Invoicelist not active! Click OK to open (needs to open Workbook “Invoicelist” or Cancel to stop (needs to stop Macro).
5. Workbook 2 “Invoicelist” is now open.
6. Find the last invoicenumber in the list. Add “1” and put the new number to the list (to prevent using double numbers). Then I want to take this number to the “Invoice’ workbook, but that can be done by copy and paste.
Now I get really stuck because I want to use variables instead of multiple copy paste actions.
Required actions Macro2:
7. We are in Workbook “Invoice”, the user activates Macro2.
8. Same check if Workbook “Invoicelist” is active as in Macro1.
Several data from “Invoice” has te be transfered to “Invoicelist”. And to be safe, this does not have to be the last cell if the user “forgot” to store date for a previous invoice!
9. Store data from sevaral cells in variables, including invoicenumber!
10. Find invoicenumber in “Invoicelist”.
11. Paste data from variables into fields on same row as correct invoicenumber.
12. Save Workbook “Invoicelist”.
13. Go back to Workbook “Invoice”.
The two problems I cannot fix is checking if Workbook is Active and store and use cell values with variables.
View 9 Replies
View Related
Apr 16, 2014
I have created timesheets for employees that work in our shop. Our company manufactures products for different industries, such as mining, wind power generation, general industrial applications, and so forth. I modified some time sheet templates I found for excel to accommodate our company's actions. Each employee has their own workbook, in which the months are separated into different worksheets. Each sheet is divided further into weeks and in each weekly section the areas of information are divided as follows:
A / B / C / D / E / F / G / H / I / J / K / L / M
Work Sector / Workshop or Fieldservice / Scope of Work / Job # / Reg or OT / Mon / Tue / Wed / Thu / Fri / Sat / Sun / Total
There are 7 workbooks (one for each employee), each with 12 sheets (one for each month). I want to create a master sheet that will pull information from everyone's timesheet if they worked on a particular job. In other words, I would like to type a job number into a cell, then have excel look through everyone's timesheets and pull over only the rows of information that contain that job number
View 12 Replies
View Related
Mar 8, 2013
Currently I have 15 Prepaid schedule sheets that get pulled together as lines in a detail sheet. The way I have the detail sheet set up currently is that I have designated 200 rows for each prepaid schedule sheet, and then I manually changed the sheet reference in the formulas every 200 lines or so, for each prepaid schedule account. One such formula looks like this:
=IF(OR(H11="",H11=0),"",IF(OR(LEFT('Prepaid Gnrl Ins'!A11,8)="Balances",'Prepaid Gnrl Ins'!A11="Variance"),"",CONCATENATE('Prepaid Gnrl Ins'!A11," - ",'Prepaid Gnrl Ins'!B11," - For month ending ",TEXT(Menu!$I$4,"mm/dd/yy"))))
The result of that formula is this: Beecher Carlson - 11/1/11 - 4/1/13 - For month ending 02/28/2013
The detail sheet also includes a formula to find values to be expensed. that formula is:
=IFERROR(IF(HLOOKUP(Menu!$I$4,'Prepaid Gnrl Ins'!$I$10:$T$110,A11,FALSE)=0,"",IF(F11="","",HLOOKUP(Menu!$I$4,'Prepaid Gnrl Ins'!$I$10:$T$110,A11,FALSE))),"")
I'm trying to shrink down the over all size of this detail sheet and I would like to be able to write code with the syntax:
IF {HLOOKUP of value in menu sheet, find in column 10 of active sheet and offset by 1 (row 11)} contains a value THEN run all formulas (examples above) and paste into detail page UNTIL value in column A contains "Balances".
After finding the word "Balances" the macro would move on to the next prepaid sheet and do the same thing.
View 1 Replies
View Related
Jul 12, 2014
I need a macro that would consolidate all data in multiple worksheets of multiple workbooks in one Master file.
All the workbooks will be in one particular folder. The macro should search for data in all the workbooks and consolidate it in one master excel workbook.
I am currently using both excel 2007 and excel 2010. This macro would really reduce manual work as currently consolidating data from 45 to 50 sheets takes an ample amount of time...
View 4 Replies
View Related
May 14, 2014
I track distribution using 1 workbook for each sales rep. Each workbook has a separate worksheet (scorecard) for each of their locations showing which of our products are used in that location, for various functions. Each of the locations has a segment (bar, nightclub, casual dining, etc.), and a class (AA, A, B, etc.). All of the scorecards are identical, and are in the same file folder on our shared drive.
Sample:
Location A Class:AA Segment: Sports Bar Rep: John Smith
Product: Product X Product Y Product Z
Well: 1 0 0
Back Bar: 0 1 0
Cocktail Menu: 0 1 1
I was unable to find an HTML maker so this is not an actual sample but what I'm looking at. The above data indicates that for location A (Sports Bar, Class AA), Product X is used as the well, Product Y is on their back bar and their cocktail menu, and Product Z is not used at this location at all.
I need to set up an analytic workbook where I can sum data based on multiple and grouped criteria, and for multiple reps ie- display a scorecard that shows totals for nightclubs and sports bars, class AA, A, and B, for a particular rep; OR display a scorecard that shows totals for nightclubs, class A for a group of reps. Ideally I would like to do this using drop down menus that allow the user to select multiple criteria in each of the drop downs, having the data auto-populate based on those selections.
View 2 Replies
View Related
Aug 2, 2013
I have three source workbooks that needed to be consolidated into a master workbook pasting the data with values & formatting.
The Master workbook also contains 6 additional worksheets that link to the data pulled in from the source files.
My question is how do I write the code so the source files populate the master in a specific order.
For example, the 3 source files are named "Central" "NED" and "WEST" and I need them to populate the master workbook in that order.
This is the code I am using to consolidate the data:
Option Explicit
Sub ConsolidateSheetsFromWorkbooks()
'Author: Jennifer Starr
'Date: 7/12/2013
'Summary: Open all files in a folder and merge data (stacked) on all
[Code] .....
View 1 Replies
View Related
Jan 15, 2010
I have created a spreadsheet to show some reports and I wanted to serch for some datas which overloops themeselves. If you can have a look at a test file I attached you will see the full picture. I have 2 tables, where the 2nd one is on the right side of the 1st one. 1st table:..............
View 3 Replies
View Related
Dec 8, 2009
I have a folder which contains a number of Workbooks which were all built using the same template, therefore the layout and formatting is identical in each one. Cells A1:B15 of these workbooks contain information which I am attempting to extract.
I have been asked to build a worksheet with two cells for user's input. The first cell is the 'Directory location cell' and the second cell is the 'Policy Number Cell.' The policy number is found in Cell A2 of every workbook.
The idea in mind is that the user inputs the directory location in the first cell, the policy number they are searching for in the second cell and then excecutes the macro. The Sheet would then return all of the valuable information from whichever workbook contained it.
I think I need to compose a macro which trawls through the folder specified in the 'Directory Cell,' opened every xls until it found the policy number which matched the value in the 'Policy Number Cell' and then returned the cells A1:B15 into the new Sheet.
View 14 Replies
View Related
Oct 29, 2009
I am trying to create functions in VBA and I need to extract data from multiple workbooks. For example, is it possible to sum data(numbers) contained in multiple workbooks using VBA? If so, how do I create that function in VBA.
View 9 Replies
View Related
Jul 18, 2006
I have a lot of paperwork that needs to be entered into Excel. When I finsih entering the data, there will be many workbooks containing many different worksheets. I know how to summarize each workbooks but is there a way I can add specific columns in each of those summary sheets into a new workbook? I guess the question is can I sum data from different workbooks into a new workbook?
View 5 Replies
View Related
Jun 14, 2007
I have 2 Excel templates using lookups to create customer quotations. When complete a macro is run which strips out formulas and links to data.
I would like to record certain data from the finished workbook in another workbook on the server e.g. quote number, date, customer, total value, follow up date.
Is it possible to include another macro that records data in certain named cells to a separate workbook when the file is saved?
View 9 Replies
View Related
Jun 14, 2007
I've got a variable row length list of data, 24 columns wide with column headers in row 7 and file descriptions on the above rows, that I need to split up into seperate Workbooks dependant upon values in the last column, all rows with the same value in column X form the same new Workbook, which I can then SaveAs with a name associated with the value. I've seen a similar thing done to sheets on the forums by using the Advance Filter and I would adapt that to copy each created worksheet to a new workbook, but a) this seems inefficient and b) my unique values are too long to name sheets from.
View 6 Replies
View Related
Jan 10, 2008
Engineering has given me 300 separate 2003 Excel Files. Each of these individual Excel files contains data I need for creating a list I have been tasked to do. Cells E3, K1, A6 and J2 in each Excel file contain the data I need for my list. Rather than manually data mining 300 separate Excel files for data I need from Cells E3, K1, A6 and J2, can this be done automatically with a macro?
I'm seeking for the Macro to automatically OPEN each individual Excel file, then copy the data from Cells E3, K1, A6, J2, and then paste this data into a list file with four columns. After the pasting is done, the macro will close the source data Excel file and move on to the next one. In the future I will have to repeat this task with probably 400 individual Excel files. Therefore, it will be great if the Macro didn't care how many Excel files required data mining.
View 4 Replies
View Related
Oct 17, 2013
I'm trying to solve i have multiple books but each book contains same information e.g
Book1
Sheet 1
Date
Name
Sheet 2
Location
Postcode
Book 2
Sheet 1
Date
Name
Sheet 2
Location
Postcode
etc ... there is also multiple sheets in each book all are same layout just each book is different customer.
I'm trying to do is have a Listbox that shows all customer name and link back to His/her file location. Then retrieve certain information and display on blank workbook?
Question:
Can this be done without opening workbook
Considering i have 20+ workbooks and growing is this even possible
Cannot merge workbooks into one as this info is supplied by third party
View 1 Replies
View Related
Aug 13, 2014
I'm trying to set up an excel that will allow me to gather data from multiple workbooks and get it into one master worksheet. All of the worksheets are formatted the same way (See below)
Employee Last Name
Employee First Name
Employee Position
Employee Series Number
Departing City
Departing State
Attended Pilot Training?
We don't have the data yet so the idea is to paste this information into their perspective worksheets and then have them automatically populate into the master tab.
View 1 Replies
View Related
Jun 16, 2014
I am trying to create a macro to gather a data range from multiple files placed a folder and combine them into a single worksheet which can be easily totaled. I've used some similar code I did for another project to gather the data. It starts by listing the file name and then the data set (About 40 cells) below the file title. However, the data sets from each spreadsheet are filling themselves into a single column one after the other, whereas I would like to have them populate one worksheet's data in each column.
[Code]......
SummaryWorkbook.xls
View 1 Replies
View Related
Nov 5, 2008
I'm trying to copy data from multiple spreadsheets into one summary spreadsheet. Each spreadsheet that I'm looking to copy data from is stored within a folder, named as a date, within a sharepoint site.
Each report is named as 'Report to PMT from Vauxhall', 'Report to PMT from Ford', 'Report to PMT from Fait' etc etc. and the format of each report is exactly the same.
From the attachments you will see that I'm trying to copy the following from the Report to PMT from Vauxhall to Summary Report:
Report to PMT from Vauxhall Cell D11 to Cell D19 of the Summary Report
Report to PMT from Vauxhall Cell E11 to Cell D19 of the Summary Report
Report to PMT from Vauxhall Cell F11 to Cell D19 of the Summary Report
Report to PMT from Ford Cell D11 to Cell D20 of the Summary Report
Report to PMT from Ford Cell E11 to Cell D20 of the Summary Report
Report to PMT from Ford Cell F11 to Cell D20 of the Summary Report
etc. etc.
View 14 Replies
View Related
Sep 5, 2007
In my VB6 project I need to loop through several Excel Workbooks with the same chart format and amend the chart data as required from time to time. There are 2 charts in Sheet2 of every workbook. With the following coding, I can only update the chart in the first workbook but not the one in the second workbook and the rest. It appears that there will be no further updates after the first workbook is closed.
Option Explicit
Dim oEquityWB As Excel.Workbook
Dim oEquityWS As Excel.Worksheet
Public Sub AmendChart()
Dim arrWorkbooks() as String'Path & Filename
Dim nn as Integer
For nn = 0 To UBound(arrWorkbooks)
If Not EquityWBOpen(arrWorkbooks(nn)) Then GoTo Next_nn
Set oEquityWS = oEquityWB.Worksheets("Sheet2")
oEquityWS.ChartObjects("Chart 1").Activate................
View 9 Replies
View Related
Nov 10, 2009
I do environmental testing for multiple hospitals and surgery centers. I've created a master workbook in excel 2007 that includes about 7 sheets. Each sheet is for account info, testing areas, billing, and reports. In the testing areas sheet, I've used a formula to compute in column F a return date for each row based on when the area in that row was tested AND based on that area's yearly schedule (quarterly, semi-annually or annually). The date tested info is in column E of each row and the yearly schedule is in column H of each row.
Every client has their own workbook created from the master workbook template. I would like to export the return dates data in column F of each workbook into a single workbook that would tell me what testing I have to do for each client in any given month so I don't have to go to each workbook and make a list manually. So, not only the date would have to show, but also all the other info in that row (acct number, location, charge, etc). BTW, the data in this testing areas sheet I want info from is not in a "table"...just in cells.
View 9 Replies
View Related
Sep 23, 2007
I have been working on this project for some time and still haven't got anywhere with it. What I am essentially trying to do is create a master summary workbook where by you press a button to activate a chunk of VBA that will grab the same range of data from multiple workbooks but also multiple sheets in those workbooks, only problem is the number of sheets in each workbook are constantly changing so I need first find some way of accessing a closed workbooks, then I need a way of looping through a segment of code that will look into approximately 10 workbooks all with a different number of sheets and taking a fixed range of cells out of each sheet and for every workbook make a new tab and paste the information in that tab then move onto the next workbook, find the number of tabs (missing out the first 3 tabs of every workbook) and copy and paste the fixed range from each tab onto a new tab the summary workbook.
I will then have a summary workbook with a number of tabs, each one a different workbook with all the data from all the tabs in that workbook, I can then pull that information using formulas or some more VBA into a summary tab on the summary workbook, consolidating all of the information.
View 6 Replies
View Related
Apr 15, 2008
I have a folder with an unlimited number of Excel Workbooks. Data within workbooks are in same format - 3 columns of data. I would like to extract the Data in the range (B55:B70) for every workbook, transpose the data and append by rows into one worksheet.
To be clear - I want to take data range B55:B70 from first workbook,transpose and put on first row - take data range from second workbook, transpose and put on second row, repeating for unlimited number of times...
View 8 Replies
View Related
Jun 27, 2008
I have read all the rules, and the guidelines for writting a thread title, and can only hope that my title meets those criteria (Dave, if they do not please do not ban me). I am fairly new to VBA, I have been able to edit other peoples code, and have created a few macros myself, and although I think I know how to use a loop and arrays, I sometimes lack some of the basics, this may be one such case. That said here is the problem I am facing.
I am creating a database, and as such I am sent several workbooks, with each workbook containning several worksheets. Within these workbooks, the naming convention of the worksheets is consistent, though each workbook may contain different number of worksheets. (the name of the worksheets represents a specific size/format).
What I have is a "Setup sheet" that I would like populated with all the data from specific worksheets in the various workbooks. So I would need to be able to get the macro to check all the workbooks, and if it finds a worksheet entitled "Sheet B" (for example) that it copies all that data into the "Setup sheet", and progresses onto the next workbook. I have the loop working and am fairly confident on this side of things, though where I am struggling is getting the Macro to know what worksheet to look at when going through the workbooks.
I need the macro to be fairly dynamic in which Worksheet it looks at so I don't want to simply hardcode the Worksheet name into the macro, rather I would like to be able to specify the worksheet name based on a cell value in the "Setup sheet". so going back to my earlier example if the cell value in the "Setup sheet" = "Sheet B" then the macro should get data from the worksheets entitled "SheetB" in the workbooks, if the cell value in the "Setup sheet" = "Sheet F" then the macro should get data from the worksheets entitled "Sheet F".
View 2 Replies
View Related
Dec 23, 2013
Book 1 sheet1 A
1234567
1234567
2658798
4083029
5507260
6931491
8355722
9779953
11204184
12628415
14052646
15476877
16901108
Book 2 sheet1 A
2658798
4083029
5507260
6931491
8355722
26587965
26365785
26143605
25921425
25699245
25477065
25254885
25032705
24810525
I need get the result Book 3 Sheet 1 A
All duplicates items from book 1 and book 2
View 6 Replies
View Related
Jul 31, 2013
I have a worksheet with the following columns:
Brand
UserName
FirstName
LastName
Email
[Code]....
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
View 3 Replies
View Related
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
Feb 5, 2010
I was searching through the internet to look for some help with regards to consolidating data from multiple workbooks from different directories into a single worksheet called Summary.
I would like to copy the entire worksheet from different workbooks in different directories into this workbook I like to call Summary. To manually do it I have to open the workbook I want to copy the worksheet from. Right click on the tab and select Move or Copy, select the sheet I want to copy and select the workbook I want to copy this sheet to. Repeat this process for all the workbooks.
The next step is to copy and paste from these sheets into a main summary sheet. The data range from these sheets are starting from row 13 onwards and they may be of different size between Column A to Column W.
For example the workbooks are coming from :
S:Area 1West.xls from worksheet Andy
S:Area 1East.xls from worksheet Bill
S:Area 1North.xls from worksheet John
S:Area 1North.xls from worksheet Albert etc...
View 9 Replies
View Related
Feb 22, 2014
I have a master workbook that has been set up to mirror the structure of a single worksheet in various other workbooks saved in different directory locations. I need some VBA code to retreive specific data from a specified worksheet in multiple workbooks which are saved in different directories and then copy the data to the master workbook, listing each data set one after another. I do not want to open any of the source workbooks to acheive this.
I attach two example workbooks to better explain:
The code has to look in various sub directories to find the relevant workbooks, (Source1) then find the specified worksheet, (Stock) and copy only rows that have data from column B to O. The data needs to be copied to the master workbook, (master) from all the source workbooks as a list with no space.
View 4 Replies
View Related
Mar 26, 2013
I have created a template workbook for individuals who work on different sites. The spreadsheets used by each individual have the same headers. The sheets all sit in the same folder in dropbox.
I am wanting to produce a summary workbook within the dropbox folder that automatically populates when an individual updates their workbook.
I have attached mock example of the individuals worksheet for your information.
The questions that I have are as follows:
1. Is it better within an individuals workbook that they record their activity all on one sheet as opposed to having a spreadsheet per months activity? It seems tidier to have a sheet per month but does this make it more difficult to produce a summary workbook?
2. The individual is required to record a patients individual drugs on separate lines but they need to record a unique identifier, age, *** and month worked. Do they need to record all this for each line of drug or is there an easier way?
3. How should the summary sheet be produced - pivot table or sheet with formulas linked to the individuals workbooks?
View 3 Replies
View Related