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


ADVERTISEMENT

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

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

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

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

View 9 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

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.

VB:
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

Create Master Workbook From Multiple Workbooks

Jul 3, 2013

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.

View 1 Replies View Related

Code To Create Customer Number

Dec 14, 2007

I have the following formula copied down from A3 to A200 in a spreadsheet, which creates a unique standardized customer number for the each names listed in B3 to B200:

=IF(B3="","","S"&LEFT(B3,1)&"-"&TEXT(SUMPRODUCT(--(LEFT($B$3:B3,1)=LEFT(B3,1)))*10,"0000"))

Therefore, with the following names listed in B3 to B10:

UPS
FedEx
Fisher Price
Bell Canada
Grand & Toy
Rogers Cable
Dominion
Blue Jays

The respective customer numbers would be:

SU-0010
SF-0010
SF-0020
SB-0010
SG-0010
SR-0010
SD-0010
SB-0020

I would like these numbers to be static, so I would appreciate it very much if someone can give me a VBA code to replace the formula.

View 9 Replies View Related

VBA Macro To Create Multiple Workbooks From One Master Workbook By Cost Centre

Jun 27, 2013

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.

View 5 Replies View Related

Macro To Create Multiple Workbooks Based On Data

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

Create Multiple Workbooks With Names Based On List

Sep 2, 2007

I have some very tedious work to do in Excel:

table looks like following:
DepID name function
S1 a YY
S1 b XX
S1 c ww
S2 d oo
S3 e ii
S3 f ll
S4 t mm
. . . . . .. . . .
. . . . . .. . . .
. . . . . .. . . .

S7999 u ee
S7999 w aa

My task is to create new folders for each department according to DepID, which means if there are 7999 departments, I have to create 7999 folders, any VBA code can do this?

View 9 Replies View Related

Transfer Rows Of Data From Multiple Workbooks To Master Workbook Based On Value In Row

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

VBA Code To Split Multiple Customer Rows?

Feb 2, 2012

I currently have a number of data sets relating to customer's and values, eg.

Customer 1 12 12 12 12 12

However within this data set I also have a number of items where different customers have been grouped but are separated with a “/”, eg.

Customer 1 / Customer 2 / Customer 3 12 12 12 12 12

I want to be able to, find these rows, and break them out so that each customer with relating data is on a separate row, eg.

Customer 1 4 4 4 4 4
Customer 2 4 4 4 4 4
Customer 3 4 4 4 4 4

View 7 Replies View Related

How To Pull Transactions Into Template Based On Customer Code

Dec 11, 2012

We've got a bug in our finance system where it can't handle any transactions that have sales but no related commission. The BI team provides a CSV file separately with this information and the sales team has to manually input it. I know how to create a template that can be uploaded into the system but don't know how to pull the data into the template from the CSV file.

I've created the attached example and what i'd like is a drop down box in cell B1 (template tab) listing all the customer codes in column B on the data tab and then based on your selection all the related transaction lines pull into columns A to F (starting on row 4).

Manual Invoicing Query.xlsx‎

View 1 Replies View Related

Merge Workbooks Together Into A Single Workbook

Jul 27, 2009

I have two workbooks that I'd like to merge together into a single workbook. Or, pull the worksheet out of one and insert it into another.

View 2 Replies View Related

Consolidation Of Workbooks Into Single Workbook

Oct 12, 2009

I'm looking to run a VBA script that will take all excel spreadsheets within a specified directory and copy a named range "Data" from each worksheet, and place it into a consolidated worksheet.

"Data" array is tentatively B2:B16. However, these files are being sent to many resources to consolidate, therefore the range can change.

Subsequent records added via Column, not by row. So worksheet's 1 data would be A2:A16, and worksheet's 2 data would be B2:A16.

Names of the worksheets are variable, but all worksheets within a given directory will need to put imported.

My VBA skill is about as developed as a 2 year old's language skills. Could anyone assist me?

View 10 Replies View Related

Collate Four Workbooks Into Single Workbook

Oct 17, 2011

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.

[URL] ..........

View 2 Replies View Related

Combine Data From Different Workbooks To A Single Workbook

Oct 3, 2008

how can you combine all data from different workbooks in to one workbook. i have 544 workbooks to combine. here is a sample screenshot of the table i need to combine.

it consists of 9 columns. rows are not consistent in number and sheets are named with numbers starting from 001 to 999 ....

View 9 Replies View Related

Consolidation Of Workbooks To Single Workbook When Data Is More Than 66k Lines

Aug 24, 2012

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.

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

example:

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

Import Data From Several Closed Workbooks To A Single Sheet In An Open Workbook

Aug 3, 2009

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.

View 3 Replies View Related

Save Single Sheet To New Workbook And Delete VBA Code From New Workbook

Jun 25, 2014

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

[code]....

View 2 Replies View Related

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

View 3 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

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 View Related

Copy Single Call Value From Multiple Workbook To Master Workbook

Sep 17, 2009

I have multiple workbooks ( with unique names) under same folder. Each workbook has "Report-Corn" sheet.

I would like to copy cell "P15" from each (workbook-> report-corn -> P15) and paste to Master.xls workbook -> Sheet 1 one after another which is also located under same folder.

View 9 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

Create Single Array From Multiple Ranges?

Sep 10, 2012

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

View 9 Replies View Related

VB Code To Email Single Worksheet Within Workbook

Jan 27, 2009

I need a code to be applied to a VB button that will email out a selected worksheet within the workbook, lets say i need to email out sheet5. Is it possible when the button is clicked to bring up my email client, (it's not Outlook) with the file already attached so i just need to add the email address/adresses?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved