Create A Standard Template Used For All Commodities

Jun 17, 2008

I want to create a standard template used for all commodities. To do this I have several columns that need to be on every quote and then depending on the commodity, a few other columns that need to be added in. I want to automate this so that I have a heading "Commodity" at the top and then a drop down menu with the different options (plastic, glass, etc.). Then once the commodity is selected the necessary columns will be inserted into the template. Is this at all possible using macros or anything else?

View 9 Replies


ADVERTISEMENT

Create Standard Workbook

Nov 28, 2007

I am fairly new in Macros, I have a workbook wich will have some data for each year month, the new month ( sheet) data will be added by a macro, copying the current sheet (month) as a base. When all months are created I need to create new workbook with only Jan (January) sheet. I created the following macro, but I think it could be reduced, in code lines, and need to how to create the new workbook based in last (December) sheet.

Sub AddSheets()
Dim wSheet As Worksheet
SheetName = ActiveSheet. Name
Select Case SheetName
Case "Jan"
On Error Resume Next
Set wSheet = Worksheets("Feb")
If wSheet Is Nothing Then
'Add Sheet Code
Sheets("Jan").Copy After:=Sheets("Jan")
ActiveSheet.Name = "Feb"
Sheets("Feb").Select...................

View 3 Replies View Related

Create Standard Deviation From Array

Feb 1, 2008

I am fairly new to VBA, i require some help creating a Standard Deviation UDF using arrays, i have made a userform that allows a user to select anywhere between 1 to 30 companies (A1: AD1) and its corresponding stockprices (A1:A60) in a sheet called companydata, using the following sub, my problem is that i am unsure how to create a function using the info the user selects. I have also created a returns function (below) but this is vba is saying that there is a out of range error, Will anyone be able to help please.

Below is the code i am using to allow for my sub: ....

View 8 Replies View Related

Macro That Will Create & Send Standard Email

Feb 13, 2009

I would like a macro that recognises the cell colour in column F if it is yellow i would like a standard email to be created & sent to the corresponding customer email address in column D. is this even possible??

View 14 Replies View Related

Create Loop That Averages Numbers Within N Standard Deviations?

Aug 13, 2013

I am trying to design a function that grabs an average of only numbers that are within a certain deviation of the mean. I got the plan down, and have done this before without VBA, its just a user defined function will be much quicker.

The gist of what I am doing: Find the standard deviation of a range and then only find the average of numbers that fall within n deviations from the mean. I am stuck with the part that I would normally use an array code for. Here is what my array would look like:

{=AVERAGE(IF((nums>high)*(nums

View 1 Replies View Related

Create New Pages From A Template?

Mar 18, 2013

I have a workbook that has a total of 128 pages. The problem is that a lot of those pages won't be used. Basically I have a sheet that needs to be filled out for each day up to around 30 days, sometimes more, most times less.

Currently I have created all the sheets that I will typically need (31 daily's, 31 daily printable reports).

Data is entered into the daily (and other spots) and then with the use of formulas transferred to the report sheet which is hidden and then printable with the use of macros.

I also need to withdraw some of this information (CSV File) to be able to populate a database.

Is it possible to have my "daily" page as a template and then create the subsequent pages as I need them? (this would have to be done with a bunch of other report pages as well). For ease of use I would need all the formulas etc that I currently have to be able to be "created" as well. As an example, there is a running total of costs associated with the "daily" pages that would need to be carried forward.

View 8 Replies View Related

Create New Sheet (Template) VBA

Jul 1, 2014

I am creating a macro to create a new sheet that is a template that has already been created. I want to create a variable that references this new sheet so I can use it in a sum function.

Here is what I have:

Sub TotalSum()
'
' TotalSum Macro
Sheets("Sheet1").Select
Sheets.Add Type:="C:Users cweberDesktopNCR & NDE TEMPLATE.xltx"
'
Dim WS As Worksheet

WS = ActiveSheet.Select -------> I want to reference WS as this newly created template.

View 7 Replies View Related

Create 3 New Tabs, Name Them, And Use Template

Aug 25, 2008

Well I am here at this fork in the road again.

I need to create 3 new tabs... 10,4, and 1

I have tried this and it creates the worksheet, but does not copy the "sheet1" as its format.

I need to do this 3 times.

For i = 1 To 1
Set ws = Worksheets.Add
ws.Name = "10"
Worksheets("Sheet1").UsedRange.Copy wsnew.Range("a1")
Next i

View 9 Replies View Related

How To Create Dynamic Invoice Template

Mar 22, 2012

I'm looking to create a dynamic invoice that has one main invoice worksheet that references a worksheet with client billing information. Keep in mind that line items will differ between clients, and ideally I'd want to be able to:

Have date autopopulate, included in every line item Select a client, which populates billing info as well as the invoice # nomenclature specific to that client Be able to have client line items specific to the client populate based on the dropdown I select

Overall, no real specific guidelines, just trying to pick some other people's brains about how to approach a dynamic invoicing template. To preface, we have about 60 clients.

View 7 Replies View Related

Create New Sheet Based On Template?

Feb 9, 2014

I have a master template with columns running from A to Q. Most of what she wanted is fairly simple 'if' statements, however she also wants to move the contents of one cell to an adjacent sell based on the number exceeding a certain value,

[Code].....

My problems start when I want to create a new sheet/tab and let her name it. I would have simply created 12 months for her, unfortunately there is a sheet for a number of people and the start of the year can vary. My simple solution was to create a macro that copies the original Template (effectively sheet 1) and puts it into the newly created tab. However this does not copy the above VBA code across

[Code] .....

View 1 Replies View Related

Create New Document From Word Template

Apr 28, 2014

I have a template document, created in MS Word. I want to generate, from Excel, a new document as would happen when you open the template from windows explorer or whatever ie. Template1.doc as opposed to Template.xlt.

The best I've managed to achieve is the opening of the template.

View 6 Replies View Related

Create New Worksheet Containing Buttons, Not By Template

Jun 18, 2008

I'm trying to create a macro that creates new worksheets with buttons on them that have macros attached. I've been able to produce one worksheet with a button and macro, but when the function that copies the code is looped it crashes out of Excel.

I realise that the usual method of doing this would be by templates, but this code will be run on other people's computers so the template wouldn’t exist in the location that i had specified (I think with my limited experience with VBA - Please correct me if I'm wrong). I've also tried to copy the page with the button on, but this takes too long (even with screenupdating = false) as there are many sheets to be created.

This is a stripped down version of the code that I have created for the purpose of this forum. To recap, the function that creates a new page, with button, with macro attached works. It's when it's looped that it crashes out. I've stepped through the program, and it reaches the second message box, then it gives up on life ..........

View 9 Replies View Related

Macro To Create Multiple Sheets From Template?

Nov 10, 2011

I'm trying to create a workbook with multiple worksheets. My first sheet to be named "Main" and each additional sheet to be named in sequence after the values in the cells between B5:B98 on !Main.

Example:
B5 = "01"
B6 = "01.1"
B7 = "01.2"
B8 = "02"
B9 = "03"
etc...

I'd like to have a macro that would take a worksheet in this workbook named "Template" and make a copy for each cell between B5:B98 and name that new worksheet "c" and then the value in each of those (B5:B98) cells.

Example:
First worksheet named "Main"
Second worksheet named "c01"
Third worksheet named "c01.1"
and so on.....

View 1 Replies View Related

Create New Word Document From Template And Save As

Jan 21, 2014

I have been working on the following VBA code, which should copy specific charts from excel into specific places in a word-template.

I Am quite new with VBA, so I googled the code, changed a few things, and it works exactly as it should - except from one thing. When the Word-document is loaded from the template, I would like the document to be "saved as..."
Instead of just opening the template. I have tried

Code:
.ActiveDocument.SaveAs Filename:=fname & ".doc"

The code is as follows:

Option Explicit
Sub EksporterTilWord()

Dim appWrd As Object
Dim objDoc As Object
Dim FilePath As String
Dim FileName As String

[Code] ...........

View 1 Replies View Related

Create New Sheet From Template - Problems With Names

Nov 15, 2007

I have 8 different workbooks which is 100% similar. Only values registred on each sheet is different. the format and rows/columns are the same.

The sheets is something that changes, when I want to improve layout etc.
I have one Template book where I do the changes and try to export this to the other books (call it upgrades). For macro moduls it works nice, just replace.

The problem is the sheets. When I have changed a sheet, replace it, it would not adopt values from the other sheets.

Ex. In sheet 2 I have named the cell 'B60' for U_KU in the new sheet 1 I expect at using =U_KU in cell I7 would adopt the values from B60 in sheet 2. But nope.

I can see that there is an link to the template workbook in edit ->linkage. Would this cause problem?

View 2 Replies View Related

Create New File With Data From Database Through A Template

Sep 12, 2006

I've been looking around to find a solution for my problem and as a last resort I have decided to make a post, and I will get straight to the point. I have 3 xl Files of relevance:

1 - is my "database" which consists of multiple sheets with different information in each. Each sheet is correlated with each other by one common ID. 2 - is my "template" which is 2 sheets, which functions as a report. The template serves as the Report which will be printed. The data from each row from the database can fill the spaces in the template.

3 - "the tool" xl file is where i have my macros and the mapping for the which columns from the database belong to which cells in the template.

Basically what I'm trying to get to work is: User opens Tool clicks "create Reports" and the tool should then open the database, pick the range of rows from the database put the data into the relevant cell in the template save the "template" with the info on it, close it and do it again with each row of data from the database. So if I pick rows 4 to 34 in my tool, it should create 30 xls files from the template and fill in the data from each row into each newly generated "report".

View 4 Replies View Related

Template Using Validation Tool To Create Dropdown Lists

Sep 17, 2012

I have been working on a template using validation tool so as to create drop down lists. Now I have to select data from a combination of two fields.

Example: I need info from Dataset A and Dataset B to create a new drop down list from Dataset C.

I tried with If AND formula =IF(AND(B4="Test";B6="de10");"ok";"no") where due to the selected values I got Ok as a return answer. However I need to have a dropdown list of relevant values selected and I am having some issues.

When I name my group (Dataset C) as DE10 so that it can be linked to DE10 value (dataset B) so that I can do a validation then I get an error as DE10 is an excel field name; therefore I thought of the IF AND solution as I was thinking of doing so that I can name Dataset C as XYZ (instead of DE10) on the data sheet however I am having some trouble in getting the drop down list to work.

Basically I need a drop down list from dataset C when certain info is picked from Dataset A and Dataset B.

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

Next,

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

Create A Default Template That Will Apply All The Same Formatting, Print Options

Nov 5, 2004

Is there any way to create a default template that will apply all the same formatting, print options, etc to every new workbook that I create. I guess what I am asking is a way to change the excel defaults for text type, border size/color, etc.

View 4 Replies View Related

Input In Cell Triggers Macro To Create Duplicate From Template Sheet And Rename?

Jan 22, 2014

I am currently doing an excel database of students application. I want a macro that creates a duplicate of a template sheet and renaming it based on the name of the student. Meaning once a name appears in the name cell, a sheet of that particular name is automatically created. At the same time, i want all the data regarding the applying student to appear the newly created sheet as shown in the attached file.

View 4 Replies View Related

Copy And Rename Sheet (template) From Cell Value Entered In Template?

Feb 21, 2013

how to create a copy of my employee attendance template. Is there a way to create a copy of the template by entering an employee name in the "name" cell of the template and it automatically renames the sheet that employee name and also saves or recopies the template for use with the next employee?

View 8 Replies View Related

Updating Excel Files...Old Template To New Template?

Jan 5, 2009

I Have a number(30+) of excel files based off of one template. I have since updated the template, thus making the the old ones obsolete. Is there a way to update the older files to use the new template without having to copy and paste the addition's row by row column by column?

None of the additions to the template will change the placement of existing data, nor will it change the data itself. It will however add Values to cells that were previously empty.

Hints, Tricks, or Ideas?

View 9 Replies View Related

VBA - Create Sheet From Template But Cancel If Sheet Already Exists

Nov 26, 2013

Code:

On Error GoTo ErrorHandler
Dim createsheet As Integer
createsheet = MsgBox("Do you want to Create a Sheet for Uncontrolled Discharge?" & vbNewLine & "NOTE: if the sheet already exists, you cannot create a sheet with the same date - select NO", vbYesNo, "Caution")

[Code] ...

ErrorHandler:
MsgBox "There is already a Sheet Created for that Date.", vbCritical
End If

Right now...it will pop up the error message but it will still create a "template" sheet with the suffix (2), (3), etc... instead of canceling the create new worksheet operation.

View 9 Replies View Related

Create New Worksheets With The "template"

Nov 28, 2008

I need to prepare form which use to complete students' results for my teachers. Therefore,
I want to run a Macro which will do following things
1. Create new worksheets with the "template" and "template_2" into the workbook "Result"
2. It should bring the data from "Main"
a. From Third column C3 and create newworksheet name (for "template")
b. From Ninth column I3 and create newworksheet name (for "template_2")
c. bring data from D3 and put in the field of "template" (N6)
d. bring data from E3 and put in the field of "template" (D5)
e. bring data from F3 and put in the field of "template" (D6)
f. bring data from J3 and put in the field of "template_2" (O6)
g. bring data from K3 and put in the field of "template_2" (D5)
h. bring data from L3 and put in the field of "template_2" (D6)
I. It should rename the worksheet tab with Data from C3 and I3 (i.e. Class and Subject)
3. It should repeat the step 2 till it reaches the empty cell

View 9 Replies View Related

Add A New Sheet From Template And Edit A Template

Apr 23, 2009

1)
I created a one-sheet template, and a new workbook from that sheet. When in that new workbook I go Insert>Sheet>Other and select the aforementioned one-sheet template, Excel crashes, or if not, it adds the new sheet, but then no longer saves the workbook and starts producing error messages (like: "An unexpected error has ocurred. AutoRecover has been disabled for this session of Excel.").

1a)
Now, the complication is that this is working when I do a model operation with a generic template sheet. So I checked the template that I actually want to form sheets after, and Excel finds no errors, nor does it's name contain any unusual characters. What could Excel prevent from working with a template like this?

2)
How do I edit a template? The only way I can find is to manually find the spot in finder, open, and save with the same name. But: if I do that, the documents basing on that template don't change accordingly. If they're intended not to, the whole template procedure makes no sense. I could then just as well copy a file. — I've been searching for tutorials on that, but google doesn't even return a single result on Excel "edit template". Therefor my very basic question here.

View 5 Replies View Related

Exporting Data From Master File To Template File (Auto-Populate Template)

May 6, 2014

I've attached 2 test files, one is the database master file containing the projects (each row represents a project, unique reference number in column A) and the other is the blank template file i'm hoping to export data into and then save down with the naming convention "column A_column B.xlsx"

Kept the test files simple but would need to modify any code to apply to much larger database consisting of many more fields etc.

Master.xlsx‎
Template.xlsx‎

View 9 Replies View Related

Create New Sheet From Template Sheet

Oct 31, 2006

I am using a code to create a new sheet using a click button, and currently have a template file that is being used.

Private Sub cmdNewSheet_Click()
Sheets.Add Before:=Sheets("Finish"), Type:="C:Documents and SettingsAdministratorMy Documents Stock ControlStockTemplate1.xlt"
Sheets(Sheets.Count - 1). Name = txtNewSheet.Text
txtNewSheet.Text = ""
End Sub

What i want to do is use a sheet in the workbook as a template. The sheet i want to use is simply called 'Temp', and the workbook i am working in is called Stock1.xls. Is this possible? I have had a look at past threads, but cannot find anything that points me in the right direction.

View 5 Replies View Related

Copy From Template And Select Any Sheet That Starts With S And Copy / Paste This Template To

Aug 19, 2008

I have a list of invoice #'s on a sheet named "Temp Sheet".

I have a VBA macro that created a new tab for each entry and named it the invoice #. So basically the vba code created a new tab ( based on the number of invoice #'s on my list ), and named each tab an invoice number. So if I had a list of 10 invoice #'s, named S1-S10, the vba code created 10 tabs, named S-1, S-2,. S-3.....

Now to my question.
I have a template sheet I want to copy from ( "Template" ), and select any sheet that starts with "S", and copy/paste this template to.

View 9 Replies View Related

Export Data From A Template File To Total List File Using Macro In Template File

Dec 18, 2012

I have a template file for ordering trafolyte and steel plates. I have added macros to this template file. The existing macros do the following (shortly described):

Macro 1: clears order
Macro 2: update order date + send a read only file to the supplier of plates + save a read only copy of the file into one of three folders acc to info in one of the cells.

It's the Macro 2 I want to edit.

I want to add a "function" which copy a selection of data.column A to N from row 12 to 548 but only the rows where there is a value in column A.

Row 1 to 11 includes standard order info and Macro buttons.
Row 11 includes the heading for order data.

For everytime someone click on the Macro 2 button in the template file, I want the selection to be paste into the first "available" row in a "Total list" file.

The "Total list" file may have to be open (or a function to open, paste selection and then close the "Total list" file may be added)

File and Folder info:

To simplify suggestions, the following file and path info can be used (I can change to the correct later):
Template file name: template_order.xlsm
Template file location: \servershared emplate

Total list file name: total_list.xlsx
Total list file location: \servershared otal

Selection info:

The template file exists of a "general order info area" A1:N10
The column heading for order data is located at A11:N11
The selection to be copied is A12:N550 - But only rows where column A includes data (not empty).
(If the spesific order consists of 14 plates than there will be item no 1-14 in column A and I then I want to copy A12:N25 (row 25 will be item 14).

When I try to use record macro it looks like it only records what's happening in the template file - It doesn't record the pasting in the total list.

View 1 Replies View Related

Standard Deviation IF?

Mar 24, 2014

Just like sumif and averageif, is there a standarddeivationif?

View 1 Replies View Related







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