Create New Workbook Based On Column Data

Jan 23, 2008

I was going through a thread that is open now about a similar subject: Create Workbooks & Worksheets For Each Group In Table. I tried getting it to work myself but was unsuccessful. I want a code that will create a new workbook for every new Vendor. I tried doing it myself but was getting compile errors... If this is not what I should be using let me know, it works the way I want with just worksheets, i thought it would be an easy conversion to workbooks

Sub PagesByDescription()
Dim rRange As Range, rCell As Range
Dim wSheet As Worksheet
Dim wSheetStart As Worksheet
Dim strText As String
Set wSheetStart = ActiveSheet
wSheetStart.AutoFilterMode = False
'Set a range variable to the correct item column
Set rRange = Range("A1", Range("A65536").End(xlUp))
'Delete any sheet called "UniqueList"
'Turn off run time errors & delete alert
On Error Resume Next
Application.DisplayAlerts = False
'Add a sheet called "UniqueList"
Worksheets.Add().Name = "UniqueList".....................

View 3 Replies


Create Column Of Data Based On Unique Items

Dec 19, 2006

I am trying to seperate singlr column information into seperate column based on the name in the Data 1 column.

Data1 Data2 Result 1 Result 2 Result 3

View 3 Replies View Related

Create Worksheets Based On Data Groups In Column

Apr 10, 2008

I have a workbook that lists system analysts and information on the systems they're responsible for. I would like to have an Excel macro that will:

1. Create and name a new worksheet for each UNIQUE value in the 'Name' column (new worksheet for each analyst)
2. Copy their system info to each respective worksheet

I've attached a sample workbook.

View 2 Replies View Related

Excel 2007 :: Split Sheet Into Workbooks Using Workbook Template Based On Data In Column A

Oct 5, 2011

I have a workbook that has a sheet called CustInvData, this sheet contains 4,421 rows of invoice transaction data for 178 customers starting on row 2 (headers on row 1). I need to split the transaction data for each customer out into a workbook template based on the customer name in column A. I need each workbook named by the customer name along with a month and year (example: Bellsouth-0911.xls), this should create 178 unique workbooks. And since we sometimes have to go back and rerun invoices for previous months, I'll need to control the month and year manually in the code.

The parsed data needs to be copied to a pre-formatted invoice template. This template has 2 sheets, Sheet1 is called 'Product Summary', this is a table that uses VLOOKUP functions to read the data in Sheet2 called 'Product Details', this is the sheet the parsed data needs to be copied to for each customer invoice. The 'Product Details' sheet has formatted rows 1 thru 11, row 11 being the header row for the data from CustInvData to be copied. So the parsed data needs to start at row 12.

Last, once the data has been copied into the 'Product Details' sheet, I need the data to be SubTotaled at each change in column J (Product) and use the 'Sum' function to add a Subtotal in column L (Retail Price) for each unique product category.

Example data below, I've simplified it (the actual data array spans from columns A to Y)

Customer NameProduct Retail Price


I'm a bit of a novice with macros, but I know Excel pretty well.

Using Excel 2007 running on Windows Vista

View 2 Replies View Related

Create New Workbook With Separate Sheets From Data In Another Workbook

Jul 16, 2012

I have been tasked with creating a macro which creates a new workbook wherein each sheet contains the information for one site from the active sheet. The active sheet already has the values sorted by the site such that all information needing to be copied from the active sheet into the new workbook is together.



There are 8 different sites on the active sheet: ATL, CEN, DAL, HAR, JAS, JCK, VIS, NOV

The macro needs to find the range for all of the data of each site and copy/paste that data into a new workbook such that ATL would have its own sheet, CEN would have its own sheet, and so on. The data ranges from A:R.

So, for example, the macro would find that the last row with ATL in the "B" column is 6095 and would then copy A2:R6095 and insert that data into the new workbook under Sheet 1.

I had some code that I had adapted to select the range for each of them, but the code loops through the entire sheet (which is 44,307 rows long) for each site making it a quite clunky and very slow step in an even longer macro. Since the data is already sorted, I know there must be a way to have the macro stop searching when it reaches data not equal to the data the row before, however, my experience with VBA is limited, and I have been unable to find a solution. Also, the data does not have to be conserved after being sent to the new workbook, if that would speed up the macro.

View 5 Replies View Related

Create New Workbook Based On Checkbox Selections

Dec 26, 2008

Could anyone please help me frame a vb code for the below explanation?

I have a sheet where in some terms are provided. Users have to open this sheet and check its description. After going through all the terms, they have to select the required terms using a checkbox given beside these terms. After checking the reqd. boxes, they would click on 'Submit' at the end of the sheet.

Once Submit is clicked, a new excel workbook should open up with the selected terms as various column headers.

View 10 Replies View Related

Create Formula In Column B To Add 4 Days To Date Based Upon Column A

Apr 3, 2014

I have a form in which users will manually enter a date in Column A. I would like to create a formula in Column B which will add 4 days to the date based upon Column A. However, the 4 days should only be added to a select set of dates which I would like to specify. If the date is not found in this select set of dates, then the result in Column B should be the same date as Column A.

View 3 Replies View Related

Create New Workbook For Each Unique Record In Column

Jun 13, 2007

I have to copy and paste each group of "Control Accounts" from column A into a separate workbook. I want to create a macro that can open as many new workbooks as there are unique records in column A and copy paste each group of unique records into those different workbooks.

View 7 Replies View Related

Create New Workbook For All Unique Values Of Column

Apr 23, 2008

this code "Creates a New Workbook" for each item listed in an excel table, then, copy all unique values in their respective Workbook and save it. So, the problem is this. instead of creating a "New Workbook", i want to open a previously created Workbook (template) and do the procedures listed above. Is this posible?

Sub Copy_To_Workbooks()
Dim CalcMode As Long
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim WSNew As Worksheet
Dim rng As Range
Dim cell As Range
Dim Lrow As Long
Dim foldername As String
Dim MyPath As String
Dim FieldNum As Integer
Dim FileExtStr As String
Dim FileFormatNum As Long
Set ws1 = Sheets("Sheet1") '<<< Change
If Val(Application.Version) < 12 Then
'You use Excel 97-2003
FileExtStr = ".xls": FileFormatNum = -4143
If ws1.Parent.FileFormat = 56 Then
FileExtStr = ".xls": FileFormatNum = 56
FileExtStr = ".xlsx": FileFormatNum = 51
End If
End If..............

View 6 Replies View Related

Macro To Create Sheets In New Workbook Based On Template And Evaluator?

Feb 10, 2013

I had created a base data with evaluator and performance appraisals templates which should be sent to each evaluator for filling up the forms based on templates


Macro that would i require will be

Where in my base data if i select filter of "Arun", i will performance appraisal templates in column I. Next, i have sheets individually created templates which refer column I

So, based on arun filter if i select, it should create a new workbook for arun and six individual sheets of employees reporting to him with a base data and appraisal templates similarly if i select anita in filter , it should create a new workbook for anita and six individual sheets of employees reporting to her with a base data and appraisal templates

View 9 Replies View Related

Macro: Create Directory Based On Active Workbook And Save To It

Sep 8, 2006

Read “My Documents” Path And Use Result



Typical user OS will be Windows XP Pro / Win 2K
Excel version : 97 / 2002 / 2003

1. Corporate network security settings will only allow directory/subdirectory creation in the “My Documents” section of customers individual computers.

2. Per customer request, VBA application needs to save extracted files for future use.

3. I can specify an initial “My Documents” subdirectory be made and the VBA application file be loaded/copied into that location – i.e. – “My DocumentsCat”.

4. When VBA application is opened from that specified directory, (first time), the application needs to make an additional subdirectory tree to save future files. I can read the opened from location via VBA with the following:

Dim filepath As String
filepath = ThisWorkbook.Path
As an example – this code would produce a string definition of “filepath” – such as the following:............................

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

How To Create A Cumulative Column Based Upon Another Column

Jul 24, 2009

I have a model built that calculates the daily Profit and loss ('Data for Pivot' tab, column M). I would like to calculate the cumulative profit and loss and am having a difficult time doing this with a simple formula. The Daily P/L column is empty (#NA value is in the cells) up until cell C138 as there is no data before that (which is the way it is supposed to be). However, once data has begun to be populated the daily profit and loss is shown (in this case from M138 onwards). The issue I am having is that I cannot seem to be able to create a formula that will capture the cumulative P/L. My desired result is evident in cells N179 onwards, as it simply captures the cumulative p/l. However, this only works if I change the formula once data is populated (in this case cell N177 is where i put in a new formula; the previous formula can be seen in cells N3-N176). If I attempt to put in the formula that is in cell N177 for all of the cells in column N, it gives me an error. Thus, I think that this may need to be programmed via VBA, but I have not been successful in doing this. The issue is that the data population in this model begins on different cells based on the different inputs that I put in ('Mov_Avg_Chart' tab, cells c6 and c8). Thus, I can't hard-code a formula based on a particular cell. If anyone can help me with this,

View 8 Replies View Related

Excel Macro To Create New Workbook Based On Category In List With Respective Sheets

Apr 27, 2014

I need new workbooks based on category name in the below list. Respective sheets should be copied from the existing workbook with items as sheet names. List can be updatable.

Vegetables carrot
vegetables brinjal
meat chicken
meat Fish
meat Mutton
grains Wheat
grains Rice

View 4 Replies View Related

Create Duplicate Rows Based On Value In A Column?

Feb 6, 2010

I have a worksheet with two columns and a few hundred lines. One has titles and the other integers indicating how many times the title needs to be copied to another worksheet or text file.

Existing Worksheet (Input)

Desired Output (Worksheet or Text File) [The entire row, including the integer could be copied as well, if it is easier.]

View 7 Replies View Related

Create Duplicate Rows Based On Value In A Column

Feb 6, 2010

I need a VBA/macro very similar to several I have seen posted here. I have a worksheet with two columns and a few hundred lines. One has titles and the other integers indicating how many times the title needs to be copied to another worksheet or text file.

Existing Worksheet (Input)

Desired Output (Worksheet or Text File) [The entire row, including the integer could be copied as well, if it is easier.]

View 2 Replies View Related

Create New Workbook From Existing Worksheet Data

Feb 17, 2009

I am working on this estimating template. To be used on Excel 97, 2000 and XP systems.

I have a few issues i am unable to resolve.

There are 2 of the worksheets (Short Quote and Stores Req) which individually need to have a button on them so i can create a new workbook as an exact coy of that sheet. but with just the values and not the formulas.

Also i am unsure on the macro on the workbook currently( as i dont know how to do macros) i dont know what it does?

View 7 Replies View Related

Macro To Create New Workbooks Based On Values In A Column

Jun 27, 2014

I have data in Column C that looks like this:


Is there a macro that can create workbooks based on this data. So, i'd have one workbook that would contain all the Johns and all the other data in Columns A -Z, then another workbook for Ted, and so on...

The number of workbooks I need is not fixed. It all depends on how many names are in column C.

View 14 Replies View Related

Create Workbooks Based On Unique Values From A Column?

Oct 9, 2012

I have a workbook with about 10000 rows of data for about 100 suppliers in Sheet1 and about 15000 rows of same Suppliers payment details in sheet2.

What I am doing now is:-Filter every supplier names in Column A of sheet1, copy all the rows and paste in sheet1 of a new workook & Again copy the Payment details of a same supplier from master file sheet2 and paste the same in sheet2 of this new workbook then save the files with the supplier name as file name in my documents folder code, that filters each suppliers data from sheet1 & 2 and paste in new workbook sheet1 & 2.

View 1 Replies View Related

Create Step Colors Based On Column Of Numbers

Dec 6, 2006

I have to make a macheine cycle chart. I have a column containing Step Names and a column containing step time in whole seconds. I need to paste the step names across Row 1 and whole numbers counting to X down colum A. I then need to have each second represented by coloring the cell, for example, Step 1 is 1 sec. and Step 2 is 2 sec. if "Step 1" is in B1 I need B2 colored then for "Step 2" in C1 i need C3-4 highlighted and so on for a variable number of steps. This is my first question so I hope I was clear enough. With this much programed I will be able to make simple changes to tweak it to fit my needs.

View 2 Replies View Related

Create Named Range Based On Column Values

Dec 30, 2007

I have a worksheet that has hourly data. So Column C of this worksheet looks like


What I want to do is, given an hour h, automatically create a named range that contains all the rows such that the value of Column C is equal to h.

View 9 Replies View Related

Create / Edit And Save Workbook From List Of Data?

Dec 21, 2012

I have a workbook which contains a list of data on the first worksheet. I need for a macro to copy the name in each row,along with its data in that row and paste it into the corresponding locations on a template located on another worksheet. It would then save the file using the date (col. a) , then the words " Scorecard for" and then the name (col. b), then loop for each row until it reaches the end of the list.

I located this code here here.However I dont know how to modify it to fit my needs. I dont have 2 separate categories for two score cards in column b. It would all run off one scorecard and each row of data.

[Code] .....

View 1 Replies View Related

Create A List Drop Down With The Source Data From Another Workbook?

May 11, 2009

I have a spreadsheet called contacts which is as it says, I have another sheet called project management, I want to have a drop down list which refers back to the contacts spreadsheet, it this possible as they are two different files?

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

Command Button To Copy Row Of Data From One Workbook To Column In Another Workbook

Jul 24, 2013

I would like to use a command button to copy a row of data from one workbook to a column in another workbook. The row of data will have different values on a daily basis but will always be B2 through BE2. I would like the copied row of data pasted in the next available column to the left in the other work book.

View 3 Replies View Related

Create Order Form That Inserts Rows Based On Value In Column

Apr 11, 2014

I'm trying to make an order form that is based off of a price list. Basically there will be 200 items or so someone can just enter the quantity they want into a column. I would then like another sheet on the workbook to auto-populate all of the fields available. The thing I'm having trouble with is I don't want the finished form to be as long as the price list with blank rows in-between. I've been reading up to make a macro work for this, but have had no success.

View 3 Replies View Related

Automatically Create List Of Column Contents Based On Criteria?

Jan 15, 2014

I have a spreadsheet that lists dates in row 6, columns V through BE. We use these dates to log attendance for kids, so under each date there may be one of many symbols, such as "x" if the student was there. I would like to create a list of the dates that meet one of two criteria: either blank or containing "WR". So, let's say column Z is blank and Y has "WR" in it. In column FB I would like a list of all of the dates that were blank or WR, so I would want the dates contained in row 6 for Y and Z. Is there a function that will 1) look for a blank or WR across a row, 2) find the associated date for that blank in row 6, and 3) write the in another column in the form of a list, each date separated by commas? Here is an example of my information. I would like for a function to automatically make the list in column FB for any dates that are blank or contain "WR".



List of Dates Absent



1/23, 1/24


View 2 Replies View Related

Fill Column Based On Column In Another Workbook

Aug 20, 2009

I am looking for a macro that will fill the column C by looking at column A at another workbook.

For example:

Full workbook:
A(column that will look) B C
blala blabla Blabla

Workbook missing entries in C row:
blabla blabla Null

So the workbook that missing entries in Column C,will look for it,by looking at
at column A,wich is the same at full workbook.

Here the workbook wich the values will be taken at Column A, named as archive

And the the workbook (named 900066_027_2373.xls)wich the column C will be filled,by looking at column A.Then find that code in the "archive.xls".See what has in it's A cell.Copy it.Paste it in current cell.

Attached Files

View 9 Replies View Related

How To Create Macro To Add Data Based On Relative Data

Jul 8, 2014

I'm creating a macro that will involve some form of if-else/case-switch, as well as a loop (probably), but I'm not too sure how to go about it.

Basically there are records in columns. Lets say Column A has numbers in it, for example

Cell A1 has "Three"
A2 has "Five"
A3 has "Two" all without quotes

I basically want a macro that will loop through the whole column, so if A1 contains "Three" (not case sensitive), then set B1 to "3" without quotes. If A2 contains "Two", then the macro will set B2 to "2" without quotes.

Of course this is sample data but you get the jist. It needs to loop through one column, so as to fill in the other column. You can assume that column A will always be filled, so the macro is being created to automatically fill in column B based on what is in column A.

View 1 Replies View Related

Create Charts From Same Data But Each Based Ob Data Criteria

Aug 31, 2006

Hi, have a question regarding dynamic charts, specifically I am trying to create several dymanic charts based on data in a single column (So i can only say my first set of data will be starting a a set location in the chart, the rest has to shift down based chart data above it). This data should organized in charts depending on the data in several other columns. For instance, need to pull out values from column based some ID and some PartNumber. A sample excel or VBA would be much appreciated. I know VBA but do not know Excel VBA much.

View 9 Replies View Related

Copyrights 2005-15, All rights reserved